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 need to read the total_tokens field in JSON which is returned from OpenAI. Can you add this field to the OpenAIStreamChatCompletionModel class? Because this class is final, I can't extend it.
The text was updated successfully, but these errors were encountered:
Hi @anasfik I am looking for this feature too. It seems that the chat responses chunk object does include usage according to the page you linked (maybe it didn't before?), just need to include stream_options: {"include_usage": true}. It says it will be null until the final chunk.
I will try to find where to put that in the library, but any help would be appreciated.
I need to read the
total_tokens
field in JSON which is returned from OpenAI. Can you add this field to theOpenAIStreamChatCompletionModel
class? Because this class is final, I can't extend it.The text was updated successfully, but these errors were encountered: