Error on topic usage metrics and costs

AttributeError in line 3

costs = 0.150 * (crew.usage_metrics.prompt_tokens + rew.usage_metrics.completion_tokens) / 1_000_000

AttributeError: ‘dict’ object has no attribute ‘prompt_tokens’

1 Like

Dear @jorgher,

Welcome to the Community!

Could you please confirm if all prior cells have been run?


Girijesh
Keep Learning AI with DeepLearning.AI!

1 Like

yes all cells has worked fine, to let you kwow i run this on my computer on. I look in different post and change the llm using gpt-4, 4o but the error remain

1 Like

Have you downloaded all the files on your computer?

Please send me your notebook via DM. I’ll look into the issues and let you know the solution.

Keep Learning AI with DeepLearning.AI - Girijesh

[quote=“Girijesh, post:4, topic:858729”]

I dowmload the L1: Automated Project: Planning, Estimation, and Allocation
(53.5 KB)

What happend why you hide this comment

1 Like

Dear @jorgher,

Sharing code within the community is not permitted, as it violates the code of conduct.


Girijesh
Keep Learning AI with DeepLearning.AI

I dont undestand because you said send me your notebook via DM, so I though that is the way . I am new in a group.
Sorry

1 Like

Click on a user name, then use the Message button.

1 Like