From 6fc36501e16dad3657857d168e71e705a4731fb1 Mon Sep 17 00:00:00 2001 From: zhiyu1998 Date: Fri, 24 Mar 2023 11:38:22 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E9=94=99=E8=AF=AF=E5=B8=A6=E6=9D=A5=E7=9A=84?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index c1737eb..0a0b73a 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -367,19 +367,19 @@ export class tools extends plugin { // 如果有ck 并且 有openai的key if (this.biliSessData && this.openaiApiKey) { - let prompt; try { - prompt = await getBiliGptInputText( + const prompt = await getBiliGptInputText( { title, desc, dynamic, aid, cid }, this.biliSessData, ); + const response = await this.chatGptClient.sendMessage(prompt); + // 暂时不设计上下文 + e.reply(response.response); } catch (err) { logger.error("总结失败,可能是没有弹幕或者网络问题!\n", err); return true; } - const response = await this.chatGptClient.sendMessage(prompt); - // 暂时不设计上下文 - e.reply(response.response); + } return true; }