Skip to content

Fix Token Count functionality for Cost Calculation #7

@initd1

Description

@initd1

'tokens_used = response_raw.usage["total_tokens"]' currently fails with the following error:

print("Tokens used for this prompt: ", response_raw.usage["total_tokens"])
AttributeError: 'generator' object has no attribute 'usage'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions