Compare commits
2 Commits
main
...
4b5d5f3b63
Author | SHA1 | Date | |
---|---|---|---|
4b5d5f3b63 | |||
4518df8312 |
@ -55,7 +55,6 @@ 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);
|
||||||
|
@ -51,7 +51,8 @@ module.exports = {
|
|||||||
|
|
||||||
run: async (client, interaction) => {
|
run: async (client, interaction) => {
|
||||||
// set a default prompt
|
// set a default prompt
|
||||||
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].`;
|
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! ---`)
|
console.log(`--- ${interaction.user.id} has requested a new session! ---`)
|
||||||
const file = './cache/' + interaction.user.id
|
const file = './cache/' + interaction.user.id
|
||||||
|
|
||||||
@ -95,7 +96,7 @@ module.exports = {
|
|||||||
} else {
|
} else {
|
||||||
if (modelList.includes(userInputModel)) {
|
if (modelList.includes(userInputModel)) {
|
||||||
model = userInputModel;
|
model = userInputModel;
|
||||||
console.log(`User set initPrompt to ${model}`)
|
console.log(`User set model 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}`);
|
||||||
|
@ -7,8 +7,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
## Env Vars for rAi chatbot
|
## Env Vars for rAi chatbot
|
||||||
- TOKEN # Pass the value from .env
|
- TOKEN={$TOKEN}
|
||||||
- PUBLIC_URL
|
- PUBLIC_URL={$PUBLIC_URL}
|
||||||
- INTERNAL_IP=serge
|
- INTERNAL_IP=serge
|
||||||
- SERGE_PORT=8008
|
- SERGE_PORT=8008
|
||||||
## Default chat settings overrides
|
## Default chat settings overrides
|
||||||
@ -28,5 +28,3 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
serge_default:
|
serge_default:
|
||||||
external: true
|
external: true
|
||||||
|
|
||||||
|
|
@ -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);
|
||||||
|
Reference in New Issue
Block a user