返回提交历史
Modified
g4f/Provider/needs_auth/Antigravity.py
+6
-5
XFEstudio/gpt4free
fix: Update thought signature handling for Gemini models in AntigravityProvider
03e77260
代码差异
1 个文件
+6
-5
@@ -992,11 +992,12 @@ class AntigravityProvider:
992
992
"name": tool_call["function"]["name"],
993
993
"args": json.loads(tool_call["function"]["arguments"]),
994
994
}
995
# Restore thoughtSignature for Gemini thinking models when available
996
thought_sig = tool_call.get("extra_content", {}).get("google", {}).get("thought_signature")
997
if thought_sig:
998
func_call["thoughtSignature"] = thought_sig
999
parts.append({"functionCall": func_call})
995
# Restore thought_signature for Gemini thinking models when available
996
thought_sig = tool_call.get("extra_content", {}).get("google", {}).get("thought_signature", "skip_thought_signature_validator")
997
if idx == 0: # Only add skip_thought_signature_validator for the first tool call if no signature is present
998
parts.append({"functionCall": func_call, "thoughtSignature": thought_sig})
999
else:
1000
parts.append({"functionCall": func_call})
1000
1001
1001
1002
# Handle string content
1002
1003
elif isinstance(content, str):