aboutsummaryrefslogtreecommitdiff
path: root/bot/src/plugins/chatbot.js
diff options
context:
space:
mode:
Diffstat (limited to 'bot/src/plugins/chatbot.js')
-rw-r--r--bot/src/plugins/chatbot.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/src/plugins/chatbot.js b/bot/src/plugins/chatbot.js
index 17a26ee..efd2ff5 100644
--- a/bot/src/plugins/chatbot.js
+++ b/bot/src/plugins/chatbot.js
@@ -1,7 +1,8 @@
-import { ollamaGlobal, ollamaModel } from '../storage/consts.js';
+import { ollamaGlobal } from '../storage/consts.js';
import { ollama } from '../utils/ollama.js';
import { AttachmentBuilder } from 'discord.js';
import { guildSettings } from '../models/guild-settings.js';
+import 'dotenv/config';
export async function ChatBot(msg, args) {
const guildSetting = await guildSettings.findOne({ where: { guildID: msg.guild.id } });
@@ -13,7 +14,7 @@ export async function ChatBot(msg, args) {
const loadingMessage = await msg.reply('Thinking...');
const response = await ollama.chat({
- model: ollamaModel,
+ model: process.env.OLLAMA_MODEL,
messages: [{ role: 'user', content: args }],
});