Skip to content

Estimate token usage, cost #870

@pengelbrecht

Description

@pengelbrecht

Discussed in #546

Originally posted by ww-jermaine August 25, 2023
Hello, is there a way to estimate the token usage and cost per call of ai_fn, ai_model, etc.?

Something like the callback from langchain:

Tokens Used: 0
        Prompt Tokens: 0
        Completion Tokens: 0
Successful Requests: 0
Total Cost (USD): $0.0
```</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions