From d2a6764dd5f1e5a8233aa3b3a759bbdc50882bd8 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 17 Dec 2025 20:25:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96gen=20step=E7=94=9F=E6=88=90p?= =?UTF-8?q?rompt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/scheduler/mcp_agent/prompt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/scheduler/mcp_agent/prompt.py b/apps/scheduler/mcp_agent/prompt.py index 71f605b484..07484d04ed 100644 --- a/apps/scheduler/mcp_agent/prompt.py +++ b/apps/scheduler/mcp_agent/prompt.py @@ -1108,7 +1108,7 @@ GEN_STEP: dict[LanguageType, str] = { 3.不要选择不存在的工具。 4.如果你认为当前已经达成了用户的目标,可以直接返回Final工具,表示计划执行结束。 5.tool_id中的工具ID必须是当前工具集合中存在的工具ID,而不是工具的名称。 - 6.如果在历史记录中一个工具执行三次以上的连续失败或者是没有返回需要的信息,则在下一次步骤中不要再使用该工具。 + 6.如果在历史记录中一个工具执行三次连续失败或者是返回空信息(空字典、空列表和空字符串),则在下一次步骤中不要再使用该工具。 7.工具在 XML标签中给出,工具的id在 下的 XML标签中给出。 # 样例 1 @@ -1195,7 +1195,7 @@ GEN_STEP: dict[LanguageType, str] = { 3. Do not choose non-existent tools. 4. If you believe that the user's goal has already been achieved, you can directly return the Final tool, indicating that the plan execution is complete. 5. The tool_id must be the tool ID that exists in the current tool set, not the name of the tool. - 6. If a tool has failed more than three consecutive times in the history or has not returned the required information, do not use that tool in the next step. + 6. If a tool has failed three consecutive times or returned empty information (empty dictionary, empty list, and empty string) in the history, do not use that tool in the next step. 7. The tools are given in the XML tags, and the tool IDs are given in the XML tags under # Example 1 -- Gitee