From a4f212a18f3dd00496aabd398bcd31dbe5b7d72f Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Fri, 11 Apr 2025 00:20:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20OneAPI=20+=20Gemini(openai)=20=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E7=A9=BA=E5=8F=82=E6=95=B0=E5=87=BD=E6=95=B0=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=97=B6=E5=8F=AF=E8=83=BD=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes: #1060 --- astrbot/core/provider/func_tool_manager.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/astrbot/core/provider/func_tool_manager.py b/astrbot/core/provider/func_tool_manager.py index 55c53eb3a..354594d88 100644 --- a/astrbot/core/provider/func_tool_manager.py +++ b/astrbot/core/provider/func_tool_manager.py @@ -348,16 +348,17 @@ class FuncCall: for f in self.func_list: if not f.active: continue - _l.append( - { - "type": "function", - "function": { - "name": f.name, - "parameters": f.parameters, - "description": f.description, - }, - } - ) + func_ = { + "type": "function", + "function": { + "name": f.name, + # "parameters": f.parameters, + "description": f.description, + }, + } + if f.parameters.get("properties"): + func_["function"]["parameters"] = f.parameters + _l.append(func_) return _l def get_func_desc_anthropic_style(self) -> list: