ref: simplify feishu history injection, tune web_scan/plan_sop/driver
This commit is contained in:
4
ga.py
4
ga.py
@@ -135,7 +135,7 @@ def web_scan(tabs_only=False, switch_tab_id=None):
|
||||
"active_tab": driver.default_session_id
|
||||
}
|
||||
}
|
||||
if not tabs_only: result["content"] = get_html(driver, cutlist=True, maxchars=23000)
|
||||
if not tabs_only: result["content"] = get_html(driver, cutlist=True, maxchars=28000)
|
||||
return result
|
||||
except Exception as e:
|
||||
return {"status": "error", "msg": format_error(e)}
|
||||
@@ -485,7 +485,7 @@ class GenericAgentHandler(BaseHandler):
|
||||
return prompt
|
||||
|
||||
def next_prompt_patcher(self, next_prompt, outcome, turn):
|
||||
if turn % 30 == 0:
|
||||
if turn % 35 == 0 and 'plan' not in str(self.related_sop):
|
||||
next_prompt += f"\n\n[DANGER] 已连续执行第 {turn} 轮。你必须总结情况进行ask_user,不允许继续重试。"
|
||||
elif turn % 7 == 0:
|
||||
next_prompt += f"\n\n[DANGER] 已连续执行第 {turn} 轮。禁止无效重试。若无有效进展,必须切换策略:1. 探测物理边界 2. 请求用户协助。如有需要,可调用 update_working_checkpoint 保存关键上下文。"
|
||||
|
||||
Reference in New Issue
Block a user