Merge branch 'ikechan8370:v2' into v2

This commit is contained in:
ifeif 2024-01-29 10:36:31 +08:00 committed by GitHub
commit ca72d76cc7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 353 additions and 60 deletions

View file

@ -97,11 +97,11 @@ export class ChatgptManagement extends plugin {
fnc: 'useOpenAIAPIBasedSolution',
permission: 'master'
},
{
reg: '^#chatgpt切换(ChatGLM|chatglm)$',
fnc: 'useChatGLMSolution',
permission: 'master'
},
// {
// reg: '^#chatgpt切换(ChatGLM|chatglm)$',
// fnc: 'useChatGLMSolution',
// permission: 'master'
// },
{
reg: '^#chatgpt切换API3$',
fnc: 'useReversedAPIBasedSolution2',
@ -152,6 +152,11 @@ export class ChatgptManagement extends plugin {
fnc: 'useQwenSolution',
permission: 'master'
},
{
reg: '^#chatgpt切换(智谱|智谱清言|ChatGLM|ChatGLM4|chatglm)$',
fnc: 'useGLM4Solution',
permission: 'master'
},
{
reg: '^#chatgpt(必应|Bing)切换',
fnc: 'changeBingTone',
@ -1032,6 +1037,16 @@ azure语音Azure 语音是微软 Azure 平台提供的一项语音服务,
}
}
async useGLM4Solution () {
let use = await redis.get('CHATGPT:USE')
if (use !== 'chatglm4') {
await redis.set('CHATGPT:USE', 'chatglm4')
await this.reply('已切换到基于ChatGLM的解决方案')
} else {
await this.reply('当前已经是ChatGLM模式了')
}
}
async changeBingTone (e) {
let tongStyle = e.msg.replace(/^#chatgpt(必应|Bing)切换/, '')
if (!tongStyle) {