From 89c9d904db1c2c873b3b0428d5f2e99737d9bddb Mon Sep 17 00:00:00 2001 From: xRay <3864998@qq.com> Date: Fri, 14 Mar 2025 09:46:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=B7=A5=E5=85=B7=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=BB=8E=20ToolChoice.REQUIRED=20=E6=9B=B4=E6=96=B0=E4=B8=BA?= =?UTF-8?q?=20ToolChoice.AUTO=EF=BC=8C=E4=BB=A5=E4=BC=98=E5=8C=96=E8=A7=84?= =?UTF-8?q?=E5=88=92=E4=BB=A3=E7=90=86=E5=92=8C=E8=A7=84=E5=88=92=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E7=9A=84=E5=B7=A5=E5=85=B7=E8=B0=83=E7=94=A8=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/agent/planning.py | 2 +- app/flow/planning.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/agent/planning.py b/app/agent/planning.py index cbd15a0..8cc2be8 100644 --- a/app/agent/planning.py +++ b/app/agent/planning.py @@ -212,7 +212,7 @@ class PlanningAgent(ToolCallAgent): messages=messages, system_msgs=[Message.system_message(self.system_prompt)], tools=self.available_tools.to_params(), - tool_choice=ToolChoice.REQUIRED, + tool_choice=ToolChoice.AUTO, ) assistant_msg = Message.from_tool_calls( content=response.content, tool_calls=response.tool_calls diff --git a/app/flow/planning.py b/app/flow/planning.py index a12bbe4..55ec5c9 100644 --- a/app/flow/planning.py +++ b/app/flow/planning.py @@ -124,7 +124,7 @@ class PlanningFlow(BaseFlow): messages=[user_message], system_msgs=[system_message], tools=[self.planning_tool.to_param()], - tool_choice=ToolChoice.REQUIRED, + tool_choice=ToolChoice.AUTO, ) # Process tool calls if present