Update bym.js (#735)

* feat: new bing (WIP)

* fix: update CopilotAIClient.js

* fix: gemini强制调用tool;real at

* feat: add bym support
This commit is contained in:
ikechan8370 2024-12-29 19:57:55 +08:00 committed by GitHub
parent 5f6c4e5abb
commit 26444df2a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 599 additions and 30 deletions

View file

@ -342,6 +342,12 @@ export class ChatgptManagement extends plugin {
fnc: 'switchToolbox',
permission: 'master'
},
{
reg: '^#chatgpt(开启|关闭)(伪人|bym)$',
fnc: 'switchBYM',
permission: 'master'
},
{
reg: '^#chatgpt(开启|关闭)gemini(搜索|代码执行)$',
fnc: 'geminiOpenSearchCE',
@ -1833,6 +1839,26 @@ azure语音Azure 语音是微软 Azure 平台提供的一项语音服务,
}
}
async switchBYM (e) {
if (e.msg.includes('开启')) {
if (Config.enableBYM) {
await this.reply('已经开启了')
return
}
Config.enableBYM = true
await this.reply('开启中', true)
await this.reply('好的已经打开bym模式')
} else {
if (!Config.enableBYM) {
await this.reply('已经是关闭的了')
return
}
Config.enableBYM = false
await this.reply('好的已经关闭bym模式')
}
}
async geminiOpenSearchCE (e) {
let msg = e.msg
let open = msg.includes('开启')
@ -1845,4 +1871,5 @@ azure语音Azure 语音是微软 Azure 平台提供的一项语音服务,
}
await e.reply('操作成功')
}
}