fixup configuration for irc-framework

main
Stef Dunlap 2023-03-13 16:57:02 -04:00
parent 2d3892ddc6
commit 8a59e82604
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
"server": "irc.libera.chat",
"port": 6697,
"nick": "chatgpt",
"tsl": false,
"tls": false,
"sasl": false,
"username": "chatgpt",
"password": "",

View File

@ -55,7 +55,7 @@ client.connect({
host: config.server,
nick: config.nick,
username: config.username,
tls: config.tsl,
tls: config.tls,
port: config.port,
account: {
account: config.username,
@ -82,10 +82,10 @@ client.on('message', async (event) => {
client.say(event.target, `(chat from ${event.nick} ignored, response in progress)`)
return;
}
let query = is_chat_cmd ? event.message.slice(chatCmd.length + 1) : event.message.slice(contCmd.length + 1);
if (is_chat_cmd && !config.alwaysRemember) {
context.clear();
}
const query = event.message.slice(chatCmd.length + 1);
context.add_user_prompt(query);
try {
await chatgpt(query, context.messages, handleChatGPTResponseLine);