fix(report_agent): update max_agents parameter description and enforce maximum limit of 10 agents

This commit is contained in:
666ghj 2026-02-14 18:35:05 +08:00
parent ae1f38cdcc
commit 08ec856a58

View file

@ -943,7 +943,7 @@ class ReportAgent:
"description": TOOL_DESC_INTERVIEW_AGENTS, "description": TOOL_DESC_INTERVIEW_AGENTS,
"parameters": { "parameters": {
"interview_topic": "采访主题或需求描述(如:'了解学生对宿舍甲醛事件的看法'", "interview_topic": "采访主题或需求描述(如:'了解学生对宿舍甲醛事件的看法'",
"max_agents": "最多采访的Agent数量可选默认5" "max_agents": "最多采访的Agent数量可选默认5最大10"
} }
} }
} }
@ -1003,9 +1003,10 @@ class ReportAgent:
elif tool_name == "interview_agents": elif tool_name == "interview_agents":
# 深度采访 - 调用真实的OASIS采访API获取模拟Agent的回答双平台 # 深度采访 - 调用真实的OASIS采访API获取模拟Agent的回答双平台
interview_topic = parameters.get("interview_topic", parameters.get("query", "")) interview_topic = parameters.get("interview_topic", parameters.get("query", ""))
max_agents = parameters.get("max_agents", 20) max_agents = parameters.get("max_agents", 5)
if isinstance(max_agents, str): if isinstance(max_agents, str):
max_agents = int(max_agents) max_agents = int(max_agents)
max_agents = min(max_agents, 10)
result = self.zep_tools.interview_agents( result = self.zep_tools.interview_agents(
simulation_id=self.simulation_id, simulation_id=self.simulation_id,
interview_requirement=interview_topic, interview_requirement=interview_topic,