Compare commits

..

2 Commits

4 changed files with 8 additions and 7 deletions

View File

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

View File

@ -17,8 +17,7 @@ var nThreads = process.env.NTHREADS;
// End session defaults
// Set model list we have downloaded
// let modelList = ["7B", "7B-native", "gpt4all"]
let modelList = ["13B", "30B", "65B", "gpt4all", "vicuna"]
let modelList = ["7B", "7B-native", "gpt4all"]
module.exports = {
name: "create-session",
@ -52,8 +51,7 @@ module.exports = {
run: async (client, interaction) => {
// 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! ---`)
const file = './cache/' + interaction.user.id
@ -97,7 +95,7 @@ module.exports = {
} else {
if (modelList.includes(userInputModel)) {
model = userInputModel;
console.log(`User set model to ${model}`)
console.log(`User set initPrompt to ${model}`)
} else {
let modelListStr = modelList.join(", ");
return interaction.followUp(`You may only use one of the following: ${modelListStr}`);

View File

@ -28,3 +28,5 @@ services:
networks:
serge_default:
external: true

View File

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