diff --git a/apps/chat.js b/apps/chat.js index 9303b75..4298395 100644 --- a/apps/chat.js +++ b/apps/chat.js @@ -248,7 +248,7 @@ export class chatgpt extends plugin { if (!c) { await this.reply('当前没有开启对话', true) } else { - await redis.del(`CHATGPT:CONVERSATIONS:${e.sender.user_id}`) + await redis.del(`CHATGPT:CONVERSATIONS_BING:${e.sender.user_id}`) await this.reply('已结束当前对话,请@我进行聊天以开启新的对话', true) } } @@ -288,7 +288,7 @@ export class chatgpt extends plugin { logger.info(`ChatGLMUser_${e.sender.user_id}`, await conversationsCache.get(`ChatGLMUser_${e.sender.user_id}`)) await conversationsCache.delete(`ChatGLMUser_${qq}`) await this.reply('已退出当前对话,该对话仍然保留。请@我进行聊天以开启新的对话', true) - } else { + } else if (use === 'api') { let c = await redis.get(`CHATGPT:CONVERSATIONS:${qq}`) if (!c) { await this.reply(`当前${atUser}没有开启对话`, true) @@ -296,6 +296,14 @@ export class chatgpt extends plugin { await redis.del(`CHATGPT:CONVERSATIONS:${qq}`) await this.reply(`已结束${atUser}的对话,TA仍可以@我进行聊天以开启新的对话`, true) } + } else if (use === 'bing') { + let c = await redis.get(`CHATGPT:CONVERSATIONS_BING:${qq}`) + if (!c) { + await this.reply(`当前${atUser}没有开启对话`, true) + } else { + await redis.del(`CHATGPT:CONVERSATIONS_BING:${qq}`) + await this.reply(`已结束${atUser}的对话,TA仍可以@我进行聊天以开启新的对话`, true) + } } } } diff --git a/utils/config.js b/utils/config.js index 651ba7e..5eb1855 100644 --- a/utils/config.js +++ b/utils/config.js @@ -68,7 +68,7 @@ const defaultConfig = { helloPrompt: '写一段话让大家来找我聊天。类似于“有人找我聊天吗?"这种风格,轻松随意一点控制在20个字以内', chatglmBaseUrl: 'http://localhost:8080', allowOtherMode: true, - version: 'v2.3.0' + version: 'v2.3.1' } const _path = process.cwd() let config = {}