You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking at docs and previous issues but couldn't find any information about consumed OpenAI tokens.
According to the OpenAI documentation, they return following information in they response:
It'd be very useful to have such information, as right now I cannot track/measure programmatically consumed OpenAI tokens.
So I imagine that if I'll put some option to query or add config, data about usage will be returned in the response, something like below:
It can be even simplified using some kind of proxy flag, so the whole OpenAI response will be returned.
Motivation, pitch
I'm working on a web app, where each user can have his own sources db. I don't want to force someone to put/use his own OpenAI api key, instead I want to control user tokens usage programmatically.
The text was updated successfully, but these errors were encountered:
Panczo
changed the title
💵 OpenAI tokens usage information returned in add and query methods.
🗼 OpenAI tokens usage information returned in add and query methods.
Sep 6, 2023
Panczo
changed the title
🗼 OpenAI tokens usage information returned in add and query methods.
🗼 Feature request: OpenAI tokens usage information returned in add and query methods.
Sep 6, 2023
Good idea, this should definitely be on the list of things to add, however this isn't a quick thing to introduce so I must ask for some patience. thanks.
🚀 The feature
I was looking at docs and previous issues but couldn't find any information about consumed OpenAI tokens.
According to the OpenAI documentation, they return following information in they response:
It'd be very useful to have such information, as right now I cannot track/measure programmatically consumed OpenAI tokens.
So I imagine that if I'll put some option to query or add config, data about usage will be returned in the response, something like below:
It can be even simplified using some kind of proxy flag, so the whole OpenAI response will be returned.
Motivation, pitch
I'm working on a web app, where each user can have his own sources db. I don't want to force someone to put/use his own OpenAI api key, instead I want to control user tokens usage programmatically.
The text was updated successfully, but these errors were encountered: