From fa53b468fdaab500b5bd567d0a6b3b6ed7a5277b Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 4 Sep 2025 11:18:58 +0800 Subject: [PATCH] fix: ensure function call name and args are not None before processing --- astrbot/core/provider/sources/gemini_source.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astrbot/core/provider/sources/gemini_source.py b/astrbot/core/provider/sources/gemini_source.py index 5d3d579c3..cc4475b6b 100644 --- a/astrbot/core/provider/sources/gemini_source.py +++ b/astrbot/core/provider/sources/gemini_source.py @@ -369,8 +369,8 @@ class ProviderGoogleGenAI(Provider): chain.append(Comp.Plain(part.text)) elif ( part.function_call - and part.function_call.name - and part.function_call.args + and part.function_call.name is not None + and part.function_call.args is not None ): llm_response.role = "tool" llm_response.tools_call_name.append(part.function_call.name)