From 054ceab4f4536fc15806a0c9b9eca0e60094980c Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Sat, 10 May 2025 22:22:27 +0800 Subject: [PATCH] =?UTF-8?q?update:=E4=BC=98=E5=8C=96=E9=9D=9ELLM=E4=BD=BF?= =?UTF-8?q?=E7=94=A8functioncall=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/providers/llm/AliBL/AliBL.py | 5 +++-- main/xiaozhi-server/core/providers/llm/fastgpt/fastgpt.py | 5 +++-- .../core/providers/llm/homeassistant/homeassistant.py | 5 ++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/main/xiaozhi-server/core/providers/llm/AliBL/AliBL.py b/main/xiaozhi-server/core/providers/llm/AliBL/AliBL.py index 16057d1d..012035ee 100644 --- a/main/xiaozhi-server/core/providers/llm/AliBL/AliBL.py +++ b/main/xiaozhi-server/core/providers/llm/AliBL/AliBL.py @@ -61,5 +61,6 @@ class LLMProvider(LLMProviderBase): yield "【LLM服务响应异常】" def response_with_functions(self, session_id, dialogue, functions=None): - logger.bind(tag=TAG).info(f"阿里百练暂未实现完整的工具调用(function call)") - return self.response(session_id, dialogue) + logger.bind(tag=TAG).error( + f"阿里百练暂未实现完整的工具调用(function call),建议使用其他意图识别" + ) diff --git a/main/xiaozhi-server/core/providers/llm/fastgpt/fastgpt.py b/main/xiaozhi-server/core/providers/llm/fastgpt/fastgpt.py index a35f41cc..b2e9d6b7 100644 --- a/main/xiaozhi-server/core/providers/llm/fastgpt/fastgpt.py +++ b/main/xiaozhi-server/core/providers/llm/fastgpt/fastgpt.py @@ -66,5 +66,6 @@ class LLMProvider(LLMProviderBase): yield "【服务响应异常】" def response_with_functions(self, session_id, dialogue, functions=None): - logger.bind(tag=TAG).info(f"fastgpt暂未实现完整的工具调用(function call)") - return self.response(session_id, dialogue) + logger.bind(tag=TAG).error( + f"fastgpt暂未实现完整的工具调用(function call),建议使用其他意图识别" + ) diff --git a/main/xiaozhi-server/core/providers/llm/homeassistant/homeassistant.py b/main/xiaozhi-server/core/providers/llm/homeassistant/homeassistant.py index 6e53695f..c436fc9e 100644 --- a/main/xiaozhi-server/core/providers/llm/homeassistant/homeassistant.py +++ b/main/xiaozhi-server/core/providers/llm/homeassistant/homeassistant.py @@ -66,7 +66,6 @@ class LLMProvider(LLMProviderBase): logger.bind(tag=TAG).error(f"生成响应时出错: {e}") def response_with_functions(self, session_id, dialogue, functions=None): - logger.bind(tag=TAG).info( - f"homeassistant不支持(function call),建议使用意图识别使用:nointent" + logger.bind(tag=TAG).error( + f"homeassistant不支持(function call),建议使用其他意图识别" ) - return self.response(session_id, dialogue)