From 15fd062380f5b840fae4019881bf1c4d1e2929fa Mon Sep 17 00:00:00 2001 From: zhiyu <542716863@qq.com> Date: Fri, 24 May 2024 17:43:36 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89key=E4=BE=9D=E7=84=B6?= =?UTF-8?q?=E6=80=BB=E7=BB=93wx=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/tools.js b/apps/tools.js index 653dc5b..91c89f4 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -1541,6 +1541,11 @@ export class tools extends plugin { } async weixin(e) { + // 判断是否有总结的条件 + if (_.isEmpty(this.aiApiKey) || _.isEmpty(this.aiApiKey)) { + e.reply("没有配置 Kimi,无法为您的微信文章总结!\n文档:https://gitee.com/kyrzy0416/rconsole-plugin") + return true; + } const urlReg = /(?:https?:\/\/)?mp\.weixin\.qq\.com\/[A-Za-z\d._?%&+\-=\/#]*/g; const wxUrl = urlReg.exec(e.msg)?.[0]; const builder = await new OpenaiBuilder()