github Azure/azure-sdk-for-net Azure.AI.OpenAI_2.0.0

8 hours ago

2.0.0 (2024-09-30)

This update marks the first stable library version for Azure.AI.OpenAI. It snaps its dependency to OpenAI's matched 2.0.0 stable version and targets the latest Azure OpenAI Service stable api-version label of 2024-06-01. As a GA label, the 2.0.0 stable version exposes a subset of preview features, with preview library labels continuing to support preview features.

Specifically included in the GA library release:

  • AudioClient, supporting transcription and translation using the whisper model
  • ChatClient, supporting chat completions, including Azure-specific features:
    • Embedded request and response content filter annotations
    • Azure Search and Cosmos DB data sources for Azure OpenAI On Your Data
  • EmbeddingClient, supporting text-embedding model embedding operations
  • ImageClient, supporting dall-e-3 image generation

Assistants, Audio Generation, Batch, Files, Fine-Tuning, and Vector Stores are not yet included in the GA surface; they will continue to be available in preview library releases and the originating Azure OpenAI Service api-version labels.

Breaking Changes

  • AzureOpenAIClient constructors accepting AzureKeyCredential have been removed; please use the ApiKeyCredential constructors, instead. Note that AzureKeyCredential will inherit from ApiKeyCredential in a future update and that AzureKeyCredential has a non-browsable Key property that may be used for conversion in the interim.
  • The AzureOpenAIClientOptions ApplicationId has been renamed to a more descriptive UserAgentApplicationId.

From OpenAI 2.0.0 stable

  • Implemented ChatMessageContent to encapsulate the representation of content parts in ChatMessage, ChatCompletion, and StreamingChatCompletionUpdate. (commit_hash)
  • Changed the representation of function arguments to BinaryData in ChatToolCall, StreamingChatToolCallUpdate, ChatFunctionCall, and StreamingChatFunctionCallUpdate. (commit_hash)
  • Renamed OpenAIClientOptions's ApplicationId to UserAgentApplicationId (commit_hash)
  • Renamed StreamingChatToolCallUpdate's Id to ToolCallId (commit_hash)
  • Renamed StreamingChatCompletionUpdate's Id to CompletionId (commit_hash)
  • Replaced Auto and None in the deprecated ChatFunctionChoice with CreateAutoChoice() and CreateNoneChoice() (commit_hash)
  • Replaced the deprecated ChatFunctionChoice(ChatFunction) constructor with CreateNamedChoice(string functionName) (commit_hash)
  • Renamed FileClient to OpenAIFileClient and the corresponding GetFileClient() method in OpenAIClient to GetOpenAIFileClient(). (commit_hash)
  • Renamed ModelClient to OpenAIModelClient and the corresponding GetModelClient() method in OpenAIClient to GetOpenAIModelClient(). (commit_hash)

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

NewReleases is sending notifications on new releases.