Total completion token count #336
Replies: 4 comments 1 reply
-
Anybody else is looking to get total token count including request and response as part of the API functionality? |
Beta Was this translation helpful? Give feedback.
-
Usage should be available in response messages. Are you looking for something else? |
Beta Was this translation helpful? Give feedback.
-
You are correct, the Stream Endpoint does not provide usage information. I believe that Another option is to use the Tokenizer, but currently, it is not working perfectly. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to access the raw JSON sent and received, so we can use a tokenizer to get a more accurate token count? The prompt text and completion text isn't the whole story, apparently. |
Beta Was this translation helpful? Give feedback.
-
With the new functions defined as part of the request, combined with streaming output, it is becoming very tricky and probably inaccurate to measure total messages + functions + response tokens. I'm building an app that charges end users by their token usage and I want to be as close as possible to what OpenAI logs and charges.
The wish is to incorporate a way to easily get to those total response / request token counts both in streaming and standard mode.
Thanks! Awesome progress!
Beta Was this translation helpful? Give feedback.
All reactions