-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MostResentAPIResult.Usage is null #166
Comments
Can someone explain? Thank you very much |
Look forward to your help @OkGoDoIt |
Hoping this can get looked at as well. I saw the 1.8 update changed some stuff, this is unfortunately still coming out null for me too. |
When streaming results, OpenAI does not provide usage details. Unfortunately this is a limitation of the OpenAI API and there's nothing I can do about it 😢 |
Thank you for the swift response and clarification |
After using Chat.StreamResponseEnumerableFromChatbotAsync() in Streaming, the Usage of Chat.MostResetAPIResult is always null. How can I obtain 'Usage' related information
var chat = _openAI.Client().Chat.CreateConversation();
chat.AppendUserInput("How to make bread ?");
await foreach (var res in chat.StreamResponseEnumerableFromChatbotAsync())
.{
await Clients.Client(connectionId).SendAsync("ChatGPTMessage", res);
}
var result = chat.MostResentAPIResult;
result.Usage is null
The text was updated successfully, but these errors were encountered: