Add docker build files and set chat default settings via exposed env vars

This commit is contained in:
GooeyTuxedo
2023-04-07 14:27:13 -07:00
parent e3c5341561
commit 4518df8312
4 changed files with 46 additions and 3 deletions

View File

@ -25,7 +25,7 @@ module.exports = {
private: true,
options: [{
"name": "model",
"description": `The model you want to run, choose from the following: ${modelList.join(", ")} | Char case matters`,
"description": `Choose from the following models: ${modelList.join(", ")} | Char case matters`,
"required": false,
"type": 3
},
@ -51,7 +51,7 @@ module.exports = {
run: async (client, interaction) => {
// set a default prompt
var 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].`;
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].`;
console.log(`--- ${interaction.user.id} has requested a new session! ---`)
const file = './cache/' + interaction.user.id
@ -96,7 +96,7 @@ module.exports = {
} else {
if (modelList.includes(userInputModel)) {
model = userInputModel;
console.log(`User set initPrompt to ${model}`)
console.log(`User set model to ${model}`)
} else {
let modelListStr = modelList.join(", ");
return interaction.followUp(`You may only use one of the following: ${modelListStr}`);