🌟 feat: #linux命令添加AI功能自学习

This commit is contained in:
zhiyu1998 2024-08-24 17:20:27 +08:00
parent c246de71a9
commit d1898554af

View File

@ -328,11 +328,9 @@ export class query extends plugin {
const Msg = await Bot.makeForwardMsg(textArrayToMakeForward(e, [`「R插件 x ${ model }」联合为您总结内容:`, kimiAns])); const Msg = await Bot.makeForwardMsg(textArrayToMakeForward(e, [`「R插件 x ${ model }」联合为您总结内容:`, kimiAns]));
await e.reply(Msg); await e.reply(Msg);
// 提取AI返回的内容并进行解析 // 提取AI返回的内容并进行解析
if (linuxInRedis[order].content.trim() === '') { const parsedData = this.parseAiResponse(order, kimiAns);
const parsedData = this.parseAiResponse(order, kimiAns); await redisExistAndUpdateObject(REDIS_YUNZAI_LINUX, order, parsedData);
await redisExistAndUpdateObject(REDIS_YUNZAI_LINUX, order, parsedData); e.reply(`已重新学习命令 ${ order } 的用法,当前已经更新功能为:${ parsedData.content }`);
e.reply(`已重新学习命令 ${ order } 的用法,当前已经更新功能为:${ parsedData.content }`);
}
} }
} catch (err) { } catch (err) {
e.reply(`暂时无法查询到当前命令!`); e.reply(`暂时无法查询到当前命令!`);