fixup configuration for irc-framework
parent
2d3892ddc6
commit
8a59e82604
|
@ -2,7 +2,7 @@
|
||||||
"server": "irc.libera.chat",
|
"server": "irc.libera.chat",
|
||||||
"port": 6697,
|
"port": 6697,
|
||||||
"nick": "chatgpt",
|
"nick": "chatgpt",
|
||||||
"tsl": false,
|
"tls": false,
|
||||||
"sasl": false,
|
"sasl": false,
|
||||||
"username": "chatgpt",
|
"username": "chatgpt",
|
||||||
"password": "",
|
"password": "",
|
||||||
|
|
4
index.js
4
index.js
|
@ -55,7 +55,7 @@ client.connect({
|
||||||
host: config.server,
|
host: config.server,
|
||||||
nick: config.nick,
|
nick: config.nick,
|
||||||
username: config.username,
|
username: config.username,
|
||||||
tls: config.tsl,
|
tls: config.tls,
|
||||||
port: config.port,
|
port: config.port,
|
||||||
account: {
|
account: {
|
||||||
account: config.username,
|
account: config.username,
|
||||||
|
@ -82,10 +82,10 @@ client.on('message', async (event) => {
|
||||||
client.say(event.target, `(chat from ${event.nick} ignored, response in progress)`)
|
client.say(event.target, `(chat from ${event.nick} ignored, response in progress)`)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
let query = is_chat_cmd ? event.message.slice(chatCmd.length + 1) : event.message.slice(contCmd.length + 1);
|
||||||
if (is_chat_cmd && !config.alwaysRemember) {
|
if (is_chat_cmd && !config.alwaysRemember) {
|
||||||
context.clear();
|
context.clear();
|
||||||
}
|
}
|
||||||
const query = event.message.slice(chatCmd.length + 1);
|
|
||||||
context.add_user_prompt(query);
|
context.add_user_prompt(query);
|
||||||
try {
|
try {
|
||||||
await chatgpt(query, context.messages, handleChatGPTResponseLine);
|
await chatgpt(query, context.messages, handleChatGPTResponseLine);
|
||||||
|
|
Loading…
Reference in New Issue