feat:提高工具调用成功率,移除冗余的描述中参数介绍,增加索引列表的描述,修改prompt,移除timing的wait打断

This commit is contained in:
SengokuCola
2026-04-10 00:45:32 +08:00
parent 0852c38e81
commit fee9341620
17 changed files with 828 additions and 450 deletions

View File

@@ -181,10 +181,7 @@ class ToolSpec:
str: 合并后的单段工具描述。
"""
parts = [self.brief_description.strip()]
if self.detailed_description.strip():
parts.append(self.detailed_description.strip())
return "\n\n".join(part for part in parts if part).strip()
return self.brief_description.strip()
def to_llm_definition(self) -> ToolDefinitionInput:
"""转换为统一的 LLM 工具定义。