mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-28 01:53:53 +08:00
fix:MCP 工具的支持能力,并优化意图识
This commit is contained in:
@@ -612,7 +612,7 @@ class ConnectionHandler:
|
||||
uuid_str = str(uuid.uuid4()).replace("-", "")
|
||||
self.sentence_id = uuid_str
|
||||
|
||||
if functions is not None:
|
||||
if self.intent_type == "function_call" and functions is not None:
|
||||
# 使用支持functions的streaming接口
|
||||
llm_responses = self.llm.response_with_functions(
|
||||
self.session_id,
|
||||
@@ -639,7 +639,7 @@ class ConnectionHandler:
|
||||
for response in llm_responses:
|
||||
if self.client_abort:
|
||||
break
|
||||
if functions is not None:
|
||||
if self.intent_type == "function_call" and functions is not None:
|
||||
content, tools_call = response
|
||||
if "content" in response:
|
||||
content = response["content"]
|
||||
|
||||
Reference in New Issue
Block a user