mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
Merge branch 'ikechan8370:v2' into v2
This commit is contained in:
commit
d0b5585539
13 changed files with 1265 additions and 98 deletions
|
|
@ -108,6 +108,16 @@ export class ChatgptManagement extends plugin {
|
|||
fnc: 'useXinghuoBasedSolution',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
reg: '^#chatgpt切换azure$',
|
||||
fnc: 'useAzureBasedSolution',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
reg: '^#chatgpt切换(Bard|bard)$',
|
||||
fnc: 'useBardBasedSolution',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
reg: '^#chatgpt(必应|Bing)切换',
|
||||
fnc: 'changeBingTone',
|
||||
|
|
@ -845,6 +855,25 @@ azure语音:Azure 语音是微软 Azure 平台提供的一项语音服务,
|
|||
await this.reply('当前已经是星火模式了')
|
||||
}
|
||||
}
|
||||
async useAzureBasedSolution () {
|
||||
let use = await redis.get('CHATGPT:USE')
|
||||
if (use !== 'azure') {
|
||||
await redis.set('CHATGPT:USE', 'azure')
|
||||
await this.reply('已切换到基于Azure的解决方案')
|
||||
} else {
|
||||
await this.reply('当前已经是Azure模式了')
|
||||
}
|
||||
}
|
||||
|
||||
async useBardBasedSolution () {
|
||||
let use = await redis.get('CHATGPT:USE')
|
||||
if (use !== 'bard') {
|
||||
await redis.set('CHATGPT:USE', 'bard')
|
||||
await this.reply('已切换到基于Bard的解决方案')
|
||||
} else {
|
||||
await this.reply('当前已经是Bard模式了')
|
||||
}
|
||||
}
|
||||
|
||||
async changeBingTone (e) {
|
||||
let tongStyle = e.msg.replace(/^#chatgpt(必应|Bing)切换/, '')
|
||||
|
|
@ -891,6 +920,7 @@ azure语音:Azure 语音是微软 Azure 平台提供的一项语音服务,
|
|||
let mode = await redis.get('CHATGPT:USE')
|
||||
const modeMap = {
|
||||
browser: '浏览器',
|
||||
azure: 'Azure',
|
||||
// apiReverse: 'API2',
|
||||
api: 'API',
|
||||
bing: '必应',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue