mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
fix: improve type checking for tool calls in Google Gemini provider
This commit is contained in:
@@ -371,9 +371,10 @@ class ProviderGoogleGenAI(Provider):
|
||||
and thinking_signature
|
||||
and "tool_calls" in message
|
||||
and any(
|
||||
tool.get("extra_content", {})
|
||||
.get("google", {})
|
||||
.get("thought_signature")
|
||||
isinstance(tool, dict)
|
||||
and isinstance(tool.get("extra_content"), dict)
|
||||
and isinstance(tool["extra_content"].get("google"), dict)
|
||||
and tool["extra_content"]["google"].get("thought_signature")
|
||||
for tool in message["tool_calls"]
|
||||
)
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user