Skip to content

Commit

Permalink
improved prints for testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Jul 15, 2024
1 parent 13160c7 commit b9a934a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vision_agent/agent/vision_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def pick_plan(
if len(tool_output.logs.stdout) > 0:
tool_output_str = tool_output.logs.stdout[0]

if verbosity >= 1:
if verbosity == 2:
_print_code("Initial code and tests:", code)
_LOGGER.info(f"Initial code execution result:\n{tool_output.text()}")

Expand All @@ -215,12 +215,15 @@ def pick_plan(
if len(tool_output.logs.stdout) > 0:
tool_output_str = tool_output.logs.stdout[0]

if verbosity == 1:
if verbosity == 2:
_print_code("Code and test after attempted fix:", code)
_LOGGER.info(f"Code execution result after attempte {count}")

count += 1

if verbosity >= 1:
_print_code("Final code:", code)

user_req = chat[-1]["content"]
context = USER_REQ.format(user_request=user_req)
# because the tool picker model gets the image as well, we have to be careful with
Expand Down

0 comments on commit b9a934a

Please sign in to comment.