Skip to content

Commit

Permalink
adding the multplan log only when user invokes multi plan mode
Browse files Browse the repository at this point in the history
  • Loading branch information
shankar-vision-eng committed Aug 27, 2024
1 parent 7165bf1 commit 7720456
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions vision_agent/agent/vision_agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,13 +756,17 @@ def chat_with_workflow(
self.planner,
)

if self.verbosity >= 1:
for p in plans:
# tabulate will fail if the keys are not the same for all elements
p_fixed = [{"instructions": e} for e in plans[p]["instructions"]]
_LOGGER.info(
f"\n{tabulate(tabular_data=p_fixed, headers='keys', tablefmt='mixed_grid', maxcolwidths=_MAX_TABULATE_COL_WIDTH)}"
)
if test_multi_plan:
if self.verbosity >= 1:
for p in plans:
# tabulate will fail if the keys are not the same for all elements
p_fixed = [
{"instructions": e} for e in plans[p]["instructions"]
]
_LOGGER.info(
f"\n{tabulate(tabular_data=p_fixed, headers='keys', tablefmt='mixed_grid', maxcolwidths=_MAX_TABULATE_COL_WIDTH)}"
)

tool_infos = retrieve_tools(
plans,
self.tool_recommender,
Expand Down

0 comments on commit 7720456

Please sign in to comment.