AgentOps-AI/agentops

[Bug]: ๐Ÿ–‡ AgentOps: Error: cannot access local variable 'formatted_cost' where it is not associated with a value

Closed this issue ยท 2 comments

Contact Details

chinkeh@hotmail.com

๐Ÿ“ฆ Package Version

0.3.13

๐ŸŽž๏ธ Framework Version

CrewAI 0.67.1

๐Ÿ”Ž Describe the Bug

File "/Users/kehchinleong/Documents/CDWP/project-mata/venv/lib/python3.11/site-packages/agentops/session.py", line 154, in end_session
f"{colored('Cost:', attrs=['bold'])} ${formatted_cost} "
^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'formatted_cost' where it is not associated with a value

๐Ÿค Contribution

  • Yes, I'd be happy to submit a pull request with these changes.
  • I need some guidance on how to contribute.
  • I'd prefer the AgentOps team to handle this update.

Created a PR here. #441

Hope to have some guidance to see if its on the right track and whether what i can further contribute

Great fix, thanks @knivore!