fix: 死循环

This commit is contained in:
ikechan8370 2025-02-17 02:23:50 +08:00
parent 3b58397a16
commit 95e776b334
2 changed files with 3 additions and 1 deletions

View file

@ -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