From e41b6760b14ef2178b4ead67ae29ce8d32c64dee Mon Sep 17 00:00:00 2001 From: wuyiqunLu <132986242+wuyiqunLu@users.noreply.github.com> Date: Fri, 26 Jul 2024 17:16:52 +0800 Subject: [PATCH] fix: change logs to log (#182) * fix: change logs to log * address comment --- vision_agent/agent/vision_agent.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vision_agent/agent/vision_agent.py b/vision_agent/agent/vision_agent.py index e61c3292..21772b81 100644 --- a/vision_agent/agent/vision_agent.py +++ b/vision_agent/agent/vision_agent.py @@ -184,7 +184,7 @@ def pick_plan( k = list(plans.keys())[0] log_progress( { - "type": "logs", + "type": "log", "log_content": "Plans created", "status": "completed", "payload": plans[k], @@ -194,7 +194,7 @@ def pick_plan( log_progress( { - "type": "logs", + "type": "log", "log_content": "Generating code to pick best plan", "status": "started", } @@ -212,7 +212,7 @@ def pick_plan( code = extract_code(model(prompt)) log_progress( { - "type": "logs", + "type": "log", "log_content": "Executing code to test plan", "code": code, "status": "running", @@ -229,7 +229,7 @@ def pick_plan( log_progress( { - "type": "logs", + "type": "log", "log_content": ( "Code execution succeed" if tool_output.success @@ -251,7 +251,7 @@ def pick_plan( ) log_progress( { - "type": "logs", + "type": "log", "log_content": "Retry running code", "code": code, "status": "running", @@ -263,7 +263,7 @@ def pick_plan( ) log_progress( { - "type": "logs", + "type": "log", "log_content": ( "Code execution succeed" if tool_output.success @@ -318,7 +318,7 @@ def pick_plan( log_progress( { - "type": "logs", + "type": "log", "log_content": "Picked best plan", "status": "complete", "payload": best_plans, @@ -771,7 +771,7 @@ def chat_with_workflow( self.log_progress( { - "type": "logs", + "type": "log", "log_content": "Creating plans", "status": "started", } @@ -798,7 +798,7 @@ def chat_with_workflow( if test_multi_plan: self.log_progress( { - "type": "logs", + "type": "log", "log_content": "Creating plans", "status": "completed", "payload": tool_lists, @@ -847,8 +847,8 @@ def chat_with_workflow( { "type": "final_code", "status": "completed" if success else "failed", - "code": DefaultImports.prepend_imports(code), "payload": { + "code": DefaultImports.prepend_imports(code), "test": test, "result": execution_result.to_json(), },