mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复如果没有key依然总结wx的bug
This commit is contained in:
parent
f58b5da14d
commit
15fd062380
@ -1541,6 +1541,11 @@ export class tools extends plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async weixin(e) {
|
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 urlReg = /(?:https?:\/\/)?mp\.weixin\.qq\.com\/[A-Za-z\d._?%&+\-=\/#]*/g;
|
||||||
const wxUrl = urlReg.exec(e.msg)?.[0];
|
const wxUrl = urlReg.exec(e.msg)?.[0];
|
||||||
const builder = await new OpenaiBuilder()
|
const builder = await new OpenaiBuilder()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user