minor: tweak prompt wording, improve OAI history compression

This commit is contained in:
Liang Jiaqing
2026-03-25 10:00:16 +08:00
parent 85250c2694
commit 1b60d2c773
2 changed files with 9 additions and 6 deletions

2
ga.py
View File

@@ -278,7 +278,7 @@ class GenericAgentHandler(BaseHandler):
summary = f"调用工具{tool_name}, args: {args}"
if tool_name == 'no_tool': summary = "直接回答了用户问题"
if type(ret.next_prompt) is str:
ret.next_prompt += "\nPROTOCOL_VIOLATION: 上一轮遗漏了<summary>。 已根据物理动作自动补全。请务必在下次回复中记得<summary>协议。"
ret.next_prompt += "\nPROTOCOL_VIOLATION: 上一轮遗漏了<summary>。 已根据物理动作自动补全。请务必在下次回复中记得<summary>协议。"
self.history_info.append('[Agent] ' + smart_format(summary, max_str_len=100))
def do_code_run(self, args, response):