feat(chat): align AI tool-use with GPT-4.1/Anthropic standards -- Fix1: AGENT_GUIDE in system prompt (Persistence/Tool-calling/Planning), Fix2: install_app def improved, Fix3: max_tool_rounds 5->15
CI / gate (push) Has been cancelled
CI / gate (push) Has been cancelled
This commit is contained in:
1 parent
a2504bce34
commit
e1e50e884e
2 files changed
+27
-3
No files matched your search
@@ -4355,11 +4355,15 @@ async def _send_message_core(
|
||||
if isinstance(function_definitions, list):
|
||||
function_definitions.append({
|
||||
"name": "install_app",
|
||||
"description": "当用户提供技能/Skill、MCP 服务或 Agent 的链接(如 GitHub 仓库、mcp.so、modelscope 等)并希望安装到平台时使用。自动识别类型(skill/mcp/agent)并安装,随后可在对话中直接使用。",
|
||||
"description": "安装新的技能(Skill)、MCP 服务或外部 Agent 到平台。\n"
|
||||
"\n"
|
||||
"【何时调用】用户明确提供链接并表示要安装/导入/添加时。例如:'帮我安装这个技能 https://github.com/...'\n"
|
||||
"【何时不调用】用户只询问安装方法、讨论某个工具但没有提供可安装链接时。\n"
|
||||
"【注意】安装完成后该技能/MCP/Agent 可在本对话中直接使用,无需额外配置。",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {"type": "string", "description": "要安装的技能/MCP/Agent 地址(URL)"},
|
||||
"url": {"type": "string", "description": "要安装的资源完整地址。必须是 http/https URL,支持 GitHub 仓库、mcp.so、modelscope 等平台链接。"},
|
||||
"type": {"type": "string", "enum": ["auto", "skill", "mcp", "agent"], "description": "安装类型,auto 表示自动识别(默认)"},
|
||||
},
|
||||
"required": ["url"],
|
||||
@@ -4562,7 +4566,7 @@ async def _send_message_core(
|
||||
|
||||
|
||||
|
||||
max_tool_rounds = 5
|
||||
max_tool_rounds = 15 # 对齐 GPT-4.1/Anthropic 标准: 足够完成复杂多步工具调用
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user