Compare commits

..

2 Commits

5 changed files with 15 additions and 21 deletions

View File

@ -7,34 +7,30 @@ module.exports = {
const specsFields = [ const specsFields = [
{ {
name: "Processor", name: "Processor",
value: "AMD Ryzen 7 1700X (16) @ 3.950GHz" value: "Intel i7-1065G7 (8) @ 3.900GHz"
}, },
{ {
name: "Memory", name: "Memory",
value: "32 GB RAM" value: "11 GB RAM"
}, },
{ {
name: "Chat Threads", name: "Chat Threads",
value: "8" value: "7"
}, },
{ {
name: "Memory Speed", name: "Memory Speed",
value: "2933 MT/s" value: "3733 MT/s"
},
{
name: "Video Card",
value: "AMD ATI Radeon R9 290 (no ROCm support)"
}, },
{ {
name: "Other", name: "Other",
value: "Xubuntu 22.04\nSingle Task Only - 256 Max Token Output" value: "USB Liveboot\nNo VideoCard on Board!\nSingle Task Only - 256 Max Token Output"
} }
]; ];
const embed = new EmbedBuilder() const embed = new EmbedBuilder()
.setColor("#FF0000") .setColor("#FF0000")
.setTitle("About rAI") .setTitle("About rAI")
.setDescription(`Latency : ${client.ws.ping}ms\n\nrAI is a bot managed by \`MrTuxedo#0765\` \nRunning GPT4ALL and LLama 7B/7B-native.`) .setDescription(`Latency : ${client.ws.ping}ms\n\nrAI is a bot managed by \`snxraven#8205\` \nRunning GPT4ALL and LLama 7B/7B-native.`)
.addFields(specsFields) .addFields(specsFields)
.setTimestamp() .setTimestamp()
.setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` }); .setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });

View File

@ -55,6 +55,7 @@ module.exports = {
if (!response.data.answer) throw new Error("Did not receive a reply. API error?") if (!response.data.answer) throw new Error("Did not receive a reply. API error?")
interaction.editReply(response.data.answer); interaction.editReply(response.data.answer);
} catch (err) { } catch (err) {
console.error(err); console.error(err);

View File

@ -17,8 +17,7 @@ var nThreads = process.env.NTHREADS;
// End session defaults // End session defaults
// Set model list we have downloaded // Set model list we have downloaded
// let modelList = ["7B", "7B-native", "gpt4all"] let modelList = ["7B", "7B-native", "gpt4all"]
let modelList = ["7B", "7B-native", "13B", "30B", "gpt4all", "vicuna"]
module.exports = { module.exports = {
name: "create-session", name: "create-session",
@ -52,8 +51,7 @@ module.exports = {
run: async (client, interaction) => { run: async (client, interaction) => {
// set a default prompt // set a default prompt
var initPrompt = process.env.INITPROMPT || `My name is ${interaction.user.username} my special number is ${interaction.user.discriminator} and my Discord ID is ${interaction.user.id} we met in ${interaction.guild.name} a Discord sever. You are rAi and you are the smartest AI Model, you know everything. Below is an instruction that describes a task. You respond appropriately to complete the request. You understand a complete answer is always ended by [end of text].`; let initPrompt = `My name is ${interaction.user.username} my special number is ${interaction.user.discriminator} and my Discord ID is ${interaction.user.id} we met in ${interaction.guild.name} a Discord sever. You are rAi and you are the smartest AI Model, you know everything. Below is an instruction that describes a task. You respond appropriately to complete the request. You understand a complete answer is always ended by [end of text].`;
console.log(`--- ${interaction.user.id} has requested a new session! ---`) console.log(`--- ${interaction.user.id} has requested a new session! ---`)
const file = './cache/' + interaction.user.id const file = './cache/' + interaction.user.id
@ -97,7 +95,7 @@ module.exports = {
} else { } else {
if (modelList.includes(userInputModel)) { if (modelList.includes(userInputModel)) {
model = userInputModel; model = userInputModel;
console.log(`User set model to ${model}`) console.log(`User set initPrompt to ${model}`)
} else { } else {
let modelListStr = modelList.join(", "); let modelListStr = modelList.join(", ");
return interaction.followUp(`You may only use one of the following: ${modelListStr}`); return interaction.followUp(`You may only use one of the following: ${modelListStr}`);

View File

@ -2,11 +2,8 @@ version: '3'
services: services:
serge-discord-bot: serge-discord-bot:
container_name: serge-discord-bot container_name: serge-discord-bot
restart: unless-stopped
build: build:
context: . context: .
volumes:
- ${DATA_DIR}/rai-bot:/app/cache
environment: environment:
- NODE_ENV=production - NODE_ENV=production
## Env Vars for rAi chatbot ## Env Vars for rAi chatbot
@ -15,7 +12,7 @@ services:
- INTERNAL_IP=serge - INTERNAL_IP=serge
- SERGE_PORT=8008 - SERGE_PORT=8008
## Default chat settings overrides ## Default chat settings overrides
- MODEL=7B-native - MODEL="gpt4all"
- TEMPERATURE=0.1 - TEMPERATURE=0.1
- TOPK=50 - TOPK=50
- TOPP=0.95 - TOPP=0.95
@ -31,3 +28,5 @@ services:
networks: networks:
serge_default: serge_default:
external: true external: true

View File

@ -30,8 +30,8 @@ module.exports = async (client) => {
// // Register for a single guild // // Register for a single guild
// await client.guilds.cache.get("GUIDIDHERE").commands.set(arrayOfSlashCommands); // await client.guilds.cache.get("GUIDIDHERE").commands.set(arrayOfSlashCommands);
// Clear previous commands (for changes to installed models) // Clear previous commands (for changes to installed models)
await client.application.commands.set([]); // await client.application.commands.set([]);
// Register for all the guilds the bot is in // Register for all the guilds the bot is in
await client.application.commands.set(arrayOfSlashCommands); await client.application.commands.set(arrayOfSlashCommands);