From 52371b339fccfd802f641253357fbbffc4b0c8ab Mon Sep 17 00:00:00 2001 From: zhiyu1998 <542716863@qq.com> Date: Tue, 10 Sep 2024 22:43:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D`R?= =?UTF-8?q?=E6=96=87=E6=A1=A3`=E5=8F=AA=E8=83=BD=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E6=9B=B4=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/query.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/query.js b/apps/query.js index cf24c4b..e8459b5 100644 --- a/apps/query.js +++ b/apps/query.js @@ -362,9 +362,13 @@ export class query extends plugin { e.reply("请输入要查询的文档内容!\n例如:#R文档 如何玩转BBDown"); return; } else if (question === "更新" || rPluginDocument?.content === undefined) { + // 权限判定 + if (!e.isMaster) { + e.reply("请让管理员发送以进行初始化,或者让管理员进行更新!"); + return; + } e.reply("更新文档中..."); const content = await llmRead(RDOC_LINK); - logger.info(content); await redisSetKey(REDIS_YUNZAI_RDOC, { content }) @@ -384,7 +388,6 @@ export class query extends plugin { } else { logger.info(RDOC_AI_PROMPT.replace("{}", question)); kimiAns = await deepSeekChat(RDOC_AI_PROMPT.replace("{}", question), rPluginDocument.content); - logger.info(kimiAns) } const Msg = await Bot.makeForwardMsg(textArrayToMakeForward(e, [`「R插件 x ${ model }」联合为您总结内容:`, kimiAns])); await e.reply(Msg);