mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-21 22:53:56 +08:00
Merge pull request #3182 from xinnan-tech/perf-tool-add-online-search
fix:修复deepseek模型下工具名重复导致错误问题
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user