fix(wrapper): potential tool_calls misjudgment

This commit is contained in:
Junyan Qin
2025-02-05 21:55:10 +08:00
parent 21e1acc4f5
commit 412f290606

View File

@@ -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]