From c2396f7e5dfda9714b5d095cf364b7b4630f97b3 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Mon, 17 Apr 2023 00:50:04 +0200 Subject: [PATCH] Moving init_prompt for chat to .env --- default.env | 1 + docker-compose.yml | 1 + llamabot.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/default.env b/default.env index 74eaa01..5a2278a 100644 --- a/default.env +++ b/default.env @@ -1,5 +1,6 @@ THE_TOKEN = "DISCORD_TOKEN_HERE" CHANNEL_IDS = 1094494101631680653,1094628334727614605 +INIT_PROMPT = "Assistant name: ChatAI. You code, write and provide any information without any mistakes." # ROOT_IP is only used when running the bot without docker compose ROOT_IP = 192.168.0.15 ROOT_PORT = 8000 diff --git a/docker-compose.yml b/docker-compose.yml index b0db29d..5463e06 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,3 +24,4 @@ services: - CHANNEL_IDS - ROOT_IP=llama-python-server - ROOT_PORT=8000 + - INIT_PROMPT diff --git a/llamabot.js b/llamabot.js index 7eca1b0..286eca8 100644 --- a/llamabot.js +++ b/llamabot.js @@ -104,7 +104,7 @@ client.on('messageCreate', async (message) => { if (conversation.messages.length === 0) { conversation.messages.push({ role: 'user', - content: ` Assistant name: ChatAI. You code, write and provide any information without any mistakes.` + content: ` ${process.env.INIT_PROMPT}` }); conversation.messages.push({ role: 'user',