fix:修复deepseek模型下工具名重复导致错误问题

This commit is contained in:
DaGou12138
2026-05-20 14:52:21 +08:00
parent fb7e2e17a8
commit 48a2bd5a5a
+1 -1
View File
@@ -952,7 +952,7 @@ class ConnectionHandler:
and hasattr(self, "func_handler")
and not force_final_answer
):
functions = self.func_handler.get_functions()
functions = list(self.func_handler.get_functions())
# 仅在第一层调用时注入 direct_answer 虚拟工具
# 递归调用(depth>0)不注入,避免模型在生成文本回复时再次调 direct_answer 导致循环
if functions is not None and depth == 0: