[Bug] Unable to `pprint_run_response` when using team
Decap1tator opened this issue · comments
Description
I'm using a team and multi-turn workflow where I kick off the team, catch the response, then enter a while loop to continue working on the task until it is complete and the team leader determines the task is complete. However I would still like to pprint the response but am unable to due to TeamRunResponse not being iterable. I attempted to typecast the TeamRunResponse into a RunResponse and that didn't work either.
Steps to Reproduce
- initialize an agent
- initialize a team
- run
team.run(<prompt>)and store the result in a variable - run
pprint_run_response(<previous team response>)
Agent Configuration (if applicable)
Team in route mode
Expected Behavior
pprint should be able to pprint the team response the same as if you ran team.print_result()
Screenshots or Logs (if applicable)
File "/home/ec2-user/repos/merlinx/plan_and_execute/agents.py", line 87, in
pprint_run_response(resp)
File "/home/ec2-user/repos/merlinx/.venv/lib/python3.10/site-packages/agno/utils/pprint.py", line 51, in pprint_run_response
for resp in run_response:
TypeError: 'TeamRunResponse' object is not iterable
Environment
- OS: Amazon Linux
- Agno Version: 1.2.6
- External Dependency Versions: None
- Additional Environment Details: 3.10.16
Hi @Decap1tator
I'll release a fix for this asap!