Azure.AI.OpenAI_1.0.0-beta.3
Pre-release
Pre-release
1.0.0-beta.3 (2023-02-17)
Features Added
- Support for streaming Completions responses, a capability that parallels setting
stream=true
in the REST API, is now available. A newGetStreamingCompletions
method onOpenAIClient
provides a response valueStreamingCompletions
type. This, in turn, exposes a collection ofStreamingChoice
objects as anIAsyncEnumerable
that will update as a streamed response progresses.StreamingChoice
further exposes anIAsyncEnumerable
of streaming text elements via aGetTextStreaming
method. Used together, this facilitates providing faster, live-updating responses for Completions via the convenientawait foreach
pattern. - ASP.NET integration via
Microsoft.Extensions.Azure
'sIAzureClientBuilder
interfaces is available.OpenAIClient
is now a supported client type for these extension methods.
Breaking Changes
CompletionsLogProbability.TokenLogProbability
, available onChoice
elements of aCompletions
response value's.Choices
collection when a non-zeroLogProbability
value is provided viaCompletionsOptions
, is now anIReadOnlyList<float?>
vs. its previous type ofIReadOnlyList<float>
. This nullability addition accomodates circumstances where some tokens produce expected null values in log probability arrays.
Bugs Fixed
- Setting
CompletionsOptions.Echo
to true while also setting a non-zeroCompletionsOptions.LogProbability
no longer results in a deserialization error during response processing.