Closed janaka closed 3 days ago
Thank you for reaching out, @janaka ! And thank you for all the useful debug information you provided!
The Azure OpenAI service does not yet support include_usage
(a.k.a. stream_options
).
Also, for future reference, this repo corresponds to the OpenAI library. If you're using the Azure.AI.OpenAI library instead and are having trouble with it, you can file issues in the Azure repo here: 🔗 https://github.com/Azure/azure-sdk-for-net. Thank you!
This feature seems to be switched on to
true
by default in the OpenAI client (correct?). However, theStreamingChatCompletionUpdate.Usage
property is alwaysnull
. This appears to be a bug.Before
CompleteChatStreamingAsync(messages, options)
is called when I inspect theoptions
object,Stream=null
andStreamOptions.IncludeUsage=true
. However, immediately afterCompleteChatStreamingAsync(messages, options)
is called when I inspect theoptions
object,Stream=true
andSteamOptions
isnull
.Client version: Azure OpenAI Azure client version: 2.0.0 Beta 2 OpenAI Client version: implicit (>= 2.0.0-beta.5) OpenAI API version option:
AzureOpenAIClientOptions.ServiceVersion.V2024_06_01
OpenAI API provider : Azure OpenAI Model name: GPT-4o