mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
* 能否加入 Azure OpenAI 的相关支持 #471 * Azure OpenAI 锅巴配置 * 增加Azure OpenAI依赖 * 动态加载Azure OpenAI依赖 --------- Co-authored-by: sigeisment <zvdfka@gmail.com> Co-authored-by: ikechan8370 <geyinchibuaa@gmail.com>
This commit is contained in:
parent
c2c6ea43de
commit
502cc810bb
6 changed files with 75 additions and 0 deletions
|
|
@ -108,6 +108,11 @@ export class ChatgptManagement extends plugin {
|
|||
fnc: 'useXinghuoBasedSolution',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
reg: '^#chatgpt切换azure$',
|
||||
fnc: 'useAzureBasedSolution',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
reg: '^#chatgpt切换(Bard|bard)$',
|
||||
fnc: 'useBardBasedSolution',
|
||||
|
|
@ -838,6 +843,15 @@ 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')
|
||||
|
|
@ -894,6 +908,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