From 4039f06bb8d3d8ddd6c7faaab0a65adce2818519 Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Fri, 17 Jan 2025 17:57:15 -0800 Subject: [PATCH] revert count --- vision_agent/agent/vision_agent_planner_v2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vision_agent/agent/vision_agent_planner_v2.py b/vision_agent/agent/vision_agent_planner_v2.py index a6356ad6..7c5b458f 100644 --- a/vision_agent/agent/vision_agent_planner_v2.py +++ b/vision_agent/agent/vision_agent_planner_v2.py @@ -218,8 +218,8 @@ def execute_code_action( f"[bold cyan]Code Execution Output ({end - start:.2f}s):[/bold cyan] [yellow]{escape(obs)}[/yellow]" ) - count = 0 - while not execution.success and count < 3: + count = 1 + while not execution.success and count <= 3: prompt = FIX_BUG.format(chat_history=get_planning(chat), code=code, error=obs) response = cast(str, model.chat([{"role": "user", "content": prompt}])) new_code = extract_tag(response, "code")