Skip to content

Commit

Permalink
fix: change logs to log (#182)
Browse files Browse the repository at this point in the history
* fix: change logs to log

* address comment
  • Loading branch information
wuyiqunLu authored Jul 26, 2024
1 parent 5b9005f commit e41b676
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions vision_agent/agent/vision_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -194,7 +194,7 @@ def pick_plan(

log_progress(
{
"type": "logs",
"type": "log",
"log_content": "Generating code to pick best plan",
"status": "started",
}
Expand All @@ -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",
Expand All @@ -229,7 +229,7 @@ def pick_plan(

log_progress(
{
"type": "logs",
"type": "log",
"log_content": (
"Code execution succeed"
if tool_output.success
Expand All @@ -251,7 +251,7 @@ def pick_plan(
)
log_progress(
{
"type": "logs",
"type": "log",
"log_content": "Retry running code",
"code": code,
"status": "running",
Expand All @@ -263,7 +263,7 @@ def pick_plan(
)
log_progress(
{
"type": "logs",
"type": "log",
"log_content": (
"Code execution succeed"
if tool_output.success
Expand Down Expand Up @@ -318,7 +318,7 @@ def pick_plan(

log_progress(
{
"type": "logs",
"type": "log",
"log_content": "Picked best plan",
"status": "complete",
"payload": best_plans,
Expand Down Expand Up @@ -771,7 +771,7 @@ def chat_with_workflow(

self.log_progress(
{
"type": "logs",
"type": "log",
"log_content": "Creating plans",
"status": "started",
}
Expand All @@ -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,
Expand Down Expand Up @@ -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(),
},
Expand Down

0 comments on commit e41b676

Please sign in to comment.