mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
fix: 死循环
This commit is contained in:
parent
3b58397a16
commit
95e776b334
2 changed files with 3 additions and 1 deletions
|
|
@ -229,6 +229,8 @@ export class CustomGoogleGeminiClient extends GoogleGeminiClient {
|
|||
if (lastFuncName && lastFuncName?.find(name => mustSendNextTurn.includes(name))) {
|
||||
mode = 'ANY'
|
||||
}
|
||||
// 防止死循环。
|
||||
delete opt.toolMode
|
||||
body.tool_config = {
|
||||
function_calling_config: {
|
||||
mode
|
||||
|
|
|
|||
|
|
@ -568,7 +568,7 @@ class Core {
|
|||
await e.reply(msg, true)
|
||||
}
|
||||
})
|
||||
option.toolMode = opt.settings.forceTool ? 'ANY' : 'AUTO'
|
||||
option.toolMode = (opt.settings.forceTool || Config.geminiForceToolKeywords?.find(k => prompt.includes(k))) ? 'ANY' : 'AUTO'
|
||||
return await client.sendMessage(prompt, option)
|
||||
} else if (use === 'chatglm4') {
|
||||
const client = new ChatGLM4Client({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue