From fde029cd91e7d401b07cee427341aa024ac94190 Mon Sep 17 00:00:00 2001 From: ifeif <36729028+ifeif@users.noreply.github.com> Date: Sun, 7 May 2023 22:32:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E4=BC=98=E5=8C=96=20(#408)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/chat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/chat.js b/apps/chat.js index 861acf2..3ac5e58 100644 --- a/apps/chat.js +++ b/apps/chat.js @@ -1089,7 +1089,7 @@ export class chatgpt extends plugin { if (useTTS) { // 缓存数据 this.cacheContent(e, use, response, prompt, quotemessage, mood, chatMessage.suggestedResponses, imgUrls) - if (response.match('New topic')) { + if (response === 'Thanks for this conversation! I\'ve reached my limit, will you hit “New topic,” please?') { this.reply('当前对话超过上限,已重置对话', false, { at: true }) await redis.del(`CHATGPT:CONVERSATIONS_BING:${e.sender.user_id}`) return false @@ -1208,7 +1208,7 @@ export class chatgpt extends plugin { } } else { this.cacheContent(e, use, response, prompt, quotemessage, mood, chatMessage.suggestedResponses, imgUrls) - if (response.match('New topic')) { + if (response === 'Thanks for this conversation! I\'ve reached my limit, will you hit “New topic,” please?') { this.reply('当前对话超过上限,已重置对话', false, { at: true }) await redis.del(`CHATGPT:CONVERSATIONS_BING:${e.sender.user_id}`) return false