github Azure/azure-sdk-for-net Azure.AI.OpenAI_1.0.0-beta.3

latest releases: Azure.ResourceManager.ServiceFabricManagedClusters_1.3.0-beta.1, Azure.AI.Translation.Document_2.0.0, Azure.Storage.Blobs.Batch_12.20.0...
pre-release21 months ago

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 new GetStreamingCompletions method on OpenAIClient provides a response value StreamingCompletions type. This, in turn, exposes a collection of StreamingChoice objects as an IAsyncEnumerable that will update as a streamed response progresses. StreamingChoice further exposes an IAsyncEnumerable of streaming text elements via a GetTextStreaming method. Used together, this facilitates providing faster, live-updating responses for Completions via the convenient await foreach pattern.
  • ASP.NET integration via Microsoft.Extensions.Azure's IAzureClientBuilder interfaces is available. OpenAIClient is now a supported client type for these extension methods.

Breaking Changes

  • CompletionsLogProbability.TokenLogProbability, available on Choice elements of a Completions response value's .Choices collection when a non-zero LogProbability value is provided via CompletionsOptions, is now an IReadOnlyList<float?> vs. its previous type of IReadOnlyList<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-zero CompletionsOptions.LogProbability no longer results in a deserialization error during response processing.

Don't miss a new azure-sdk-for-net release

NewReleases is sending notifications on new releases.