How to obtain the number of tokens for Prompt and Completion in streaming mode? #209
-
Hello, in this project, if I set "stream: true", how can I obtain the token values for Prompt and Completion? Can you tell me how to get the value of token? |
Beta Was this translation helpful? Give feedback.
Answered by
waylaidwanderer
Mar 28, 2023
Replies: 1 comment 1 reply
-
OpenAI doesn't provide that information in streaming mode. You have to keep track of it yourself some other way. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
waylaidwanderer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OpenAI doesn't provide that information in streaming mode. You have to keep track of it yourself some other way.