Track Openai Assistant API costs #2625
christos-bsq
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the feature or potential improvement
Idea
Monitor costs for tool usage within Langfuse,
Case: OpenAI's Assistants API
Besides, I/O tokens, OpenAI can also charge you for tool usage via the Assistants API:
source: https://openai.com/api/pricing/
Langfuse changes
Then specifically for Assistants API, use the OpenAI response to calculate cost (e.g. if OpenAI's response has Code Interpreter in the tool usage, add the flat $0.03 as cost)
Other cases
A developer might also use other tools and APIs (e.g. a Google Search API) when building agents.
Using Langfuse as the central hub for cost monitoring would be nice.
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions