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
below code baiscly. Usage is set fine when CreateCompletion is used instead.
await foreach (var res in _openAiService.Completions.CreateCompletionAsStream(
completionCreateRequest,_gptConfig.Model,token))
{
if (res.Usage != null)
{
//this is allwayas null
}
if (!string.IsNullOrEmpty(res.Choices.First().Text))
{
//even when this returns something
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
below code baiscly. Usage is set fine when CreateCompletion is used instead.
await foreach (var res in _openAiService.Completions.CreateCompletionAsStream(
completionCreateRequest,_gptConfig.Model,token))
{
if (res.Usage != null)
{
//this is allwayas null
}
if (!string.IsNullOrEmpty(res.Choices.First().Text))
{
//even when this returns something
}
}
Beta Was this translation helpful? Give feedback.
All reactions