From 412f29060655405c05ee8b26ec346f75f8fbae1c Mon Sep 17 00:00:00 2001 From: Junyan Qin Date: Wed, 5 Feb 2025 21:55:10 +0800 Subject: [PATCH] fix(wrapper): potential tool_calls misjudgment --- pkg/pipeline/wrapper/wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/pipeline/wrapper/wrapper.py b/pkg/pipeline/wrapper/wrapper.py index 1ffb3147..a06e4a80 100644 --- a/pkg/pipeline/wrapper/wrapper.py +++ b/pkg/pipeline/wrapper/wrapper.py @@ -102,7 +102,7 @@ class ResponseWrapper(stage.PipelineStage): new_query=query ) - if result.tool_calls is not None: # 有函数调用 + if result.tool_calls is not None and len(result.tool_calls) > 0: # 有函数调用 function_names = [tc.function.name for tc in result.tool_calls]