OpenAI usage
Hi, I would like to know how to get information about the OpenAI usage from Agents. I mean, how could I know the tokens used by each Agents.
I need to know that for being able to estimate the cost of the solution.
Thanks!
You can use langchain for that.
I added at the end of the crew run result = {{crew_name}}.kickoff() metrics={{crew_name}}.usage_metrics
return (result, metrics)
And captured on the calling side like
(result, metrics) = custom_crew.run()
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.