From 980fd4a2ee61403556156ee1363728ad26b6a9e2 Mon Sep 17 00:00:00 2001 From: zhiyu1998 <542716863@qq.com> Date: Fri, 23 Aug 2024 20:50:25 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D`#linux?= =?UTF-8?q?`=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/query.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/query.js b/apps/query.js index 14d0fcd..a92b107 100644 --- a/apps/query.js +++ b/apps/query.js @@ -303,11 +303,14 @@ export class query extends plugin { } else { aiBuilder = await builder.kimi(`我现在需要一个Linux命令去完成:“${ order }”,你能否帮助我查询到相关的一些命令用法和示例,内容简洁明了即可`); } - const { ans: kimiAns, model } = aiBuilder; - const Msg = await Bot.makeForwardMsg(textArrayToMakeForward(e, [`「R插件 x ${ model }」联合为您总结内容:`, kimiAns])); - await e.reply(Msg); + // 如果填了写 AI 才总结 + if (this.aiApiKey && this.aiBaseURL) { + const { ans: kimiAns, model } = aiBuilder; + const Msg = await Bot.makeForwardMsg(textArrayToMakeForward(e, [`「R插件 x ${ model }」联合为您总结内容:`, kimiAns])); + await e.reply(Msg); + } } catch (err) { - e.reply(`暂时无法查询到更多详细内容如果需要,可配置AI!${HELP_DOC}`); + e.reply(`暂时无法查询到当前命令!`); } return true; }