mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
去除bard
This commit is contained in:
parent
d111d2625e
commit
8efcce45a0
8 changed files with 4 additions and 517 deletions
13
apps/chat.js
13
apps/chat.js
|
|
@ -735,10 +735,6 @@ export class chatgpt extends plugin {
|
|||
key = `CHATGPT:CONVERSATIONS_XH:${(e.isGroup && Config.groupMerge) ? e.group_id.toString() : e.sender.user_id}`
|
||||
break
|
||||
}
|
||||
case 'bard': {
|
||||
key = `CHATGPT:CONVERSATIONS_BARD:${(e.isGroup && Config.groupMerge) ? e.group_id.toString() : e.sender.user_id}`
|
||||
break
|
||||
}
|
||||
case 'azure': {
|
||||
key = `CHATGPT:CONVERSATIONS_AZURE:${e.sender.user_id}`
|
||||
break
|
||||
|
|
@ -797,8 +793,8 @@ export class chatgpt extends plugin {
|
|||
if (chatMessage?.noMsg) {
|
||||
return false
|
||||
}
|
||||
// 处理星火和bard图片
|
||||
if ((use === 'bard' || use === 'xh') && chatMessage?.images) {
|
||||
// 处理星火图片
|
||||
if (use === 'xh' && chatMessage?.images) {
|
||||
chatMessage.images.forEach(element => {
|
||||
this.reply([element.tag, segment.image(element.url)])
|
||||
})
|
||||
|
|
@ -826,11 +822,6 @@ export class chatgpt extends plugin {
|
|||
}
|
||||
previousConversation.messages.push(chatMessage.message)
|
||||
}
|
||||
if (use === 'bard' && !chatMessage.error) {
|
||||
previousConversation.parentMessageId = chatMessage.responseID
|
||||
previousConversation.clientId = chatMessage.choiceID
|
||||
previousConversation.invocationId = chatMessage._reqID
|
||||
}
|
||||
if (Config.debug) {
|
||||
logger.info(chatMessage)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,11 +123,6 @@ export class ChatgptManagement extends plugin {
|
|||
fnc: 'useAzureBasedSolution',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
reg: '^#chatgpt切换(Bard|bard)$',
|
||||
fnc: 'useBardBasedSolution',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
reg: '^#chatgpt切换(通义千问|qwen|千问)$',
|
||||
fnc: 'useQwenSolution',
|
||||
|
|
@ -968,16 +963,6 @@ azure语音:Azure 语音是微软 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 patchGemini () {
|
||||
const _path = process.cwd()
|
||||
let packageJson = fs.readFileSync(`${_path}/package.json`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue