fix:MCP 工具的支持能力,并优化意图识

This commit is contained in:
CGD
2025-06-11 22:02:57 +08:00
parent 0e57aad12d
commit 68dbc91d54
3 changed files with 44 additions and 7 deletions
+2 -2
View File
@@ -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"]