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
@@ -151,6 +151,13 @@ class IntentProvider(IntentProviderBase):
if self.promot == "":
functions = conn.func_handler.get_functions()
if hasattr(conn, "mcp_client"):
mcp_tools = conn.mcp_client.get_available_tools()
if mcp_tools is not None and len(mcp_tools) > 0:
if functions is None:
functions = []
functions.extend(mcp_tools)
self.promot = self.get_intent_system_prompt(functions)
music_config = initialize_music_handler(conn)