Skip to content

Commit e11e5b2

Browse files
authored
Azure OpenAI: 2.1.0 release preparation (2024-10-21 label) (#47419)
* initial mirror * squashed merge after OpenAI 2.1.0 release * Update assets.json * fix old, broken direct link in README * pre-release changelog snap * use concrete 2.1.0 pinning
1 parent fa59718 commit e11e5b2

File tree

107 files changed

+1078
-954
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1078
-954
lines changed

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
</ItemGroup>
187187

188188
<ItemGroup Condition="$(MSBuildProjectName.StartsWith('Azure.AI.OpenAI'))">
189-
<PackageReference Update="OpenAI" Version="2.1.0-beta.2" />
189+
<PackageReference Update="OpenAI" Version="2.1.0" />
190190
</ItemGroup>
191191

192192
<ItemGroup Condition="$(MSBuildProjectName.StartsWith('Azure.Developer.MicrosoftPlaywrightTesting'))">

sdk/openai/Azure.AI.OpenAI/CHANGELOG.md

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,43 @@
11
# Release History
22

3-
## 2.1.0-beta.3 (Unreleased)
3+
## 2.1.0 (2024-12-05)
4+
5+
This GA library release aligns functionality with the latest `2024-10-21` stable service API label.
6+
7+
> [!NOTE]
8+
> For consistency and reliability, GA releases of the `Azure.AI.OpenAI` library will always map to stable Azure OpenAI service API versions. Because stable service API versions omit volatile surfaces such as beta features, GA library releases will also not contain the full set of preview functionality. To use beta and preview features, please use the latest prerelease version of the library.
49
510
### Features Added
611

7-
### Breaking Changes
12+
**Chat**
813

9-
### Bugs Fixed
14+
- [GA] The `2024-10-21` API version brings GA AOAI support for streaming token usage in chat completions; `Usage` is now automatically populated in `StreamingChatCompletionUpdate` instances.
15+
- Note 1: this feature is not yet compatible when using On Your Data features (after invoking the `.AddDataSource()` extension method on `ChatCompletionOptions`)
16+
- Note 2: this feature is not yet compatible when using image input (a `ChatMessageContentPart` of `Kind` `Image`)
17+
- [GA] The `AllowParalllelToolCalls` property on `ChatCompletionOptions`, which can be set to `false` to disable the invocation of multiple tools on a single chat completion response, is now supported.
18+
- [GA] Structured outputs, via the use of `ChatResponseFormat.CreateJsonSchemaFormat()`, is now supported.
19+
- When using `o1-preview` and `o1-mini` models, `max_completion_tokens` may now be configured by calling the `[Experimental] SetNewMaxCompletionTokensPropertyEnabled()` extension method on `ChatCompletionOptions`.
20+
- This extension method will be removed in a future service API version, when it becomes unnecessary once all models support the `max_completion_tokens` property
1021

11-
### Other Changes
22+
**Batch**
1223

13-
## 2.1.0-beta.2 (2024-11-04)
24+
The `2024-10-21` service API label introduces stable support for batch chat completions to Azure OpenAI. This library release exposes low-level support for batch:
1425

15-
This update brings compatibility with the Azure OpenAI `2024-10-01-preview` service API version as well as the `2.1.0-beta.2` release of the `OpenAI` library.
26+
- `AzureOpenAIClient`'s `GetOpenAIFileClient()` will now return a valid, configured instance of `FileClient` that supports uploading files with `FileUploadPurpose.Batch`. This can be used to upload the contents of a valid `.jsonl` file for batch processing.
27+
- `AzureOpenAIClient`'s `GetBatchClient()` will now return a valid, configured instance of `BatchClient` that can produce a `CreateBatchOperation` given an uploaded file ID using protocol methods.
28+
- Strongly typed convenience surfaces for `BatchClient` will arrive in a future update.
1629

1730
### Breaking Changes
1831

19-
- `[Experimental]` `ChatCitation` and `ChatRetrievedDocument` have each replaced the `Uri` property of type `System.Uri` with a `string` property named `Url`. This aligns with the REST specification and accounts for the wire value of `url` not always providing a valid RFC 3986 identifier [[azure-sdk-for-net \#46793](https://github.com/Azure/azure-sdk-for-net/issues/46793)]
32+
> [!NOTE]
33+
> GA library releases only permit breaking changes to items marked with an `[Experimental]` attribute and these changes will be minimized whenever possible.
34+
35+
- `[Experimental]` `GetBatchClient(string deploymentName)` on `AzureOpenAIClient` is removed, as the Azure OpenAI batch API now aligns with OpenAI's in not using a deployment-based request URI path. Please use `GetBatchClient()`, instead.
36+
- `[Expermental]` the `Uri` property of type `System.Uri` in `ChatCitation` and `ChatRetrivedDocument` has been replaced by a `Url` property of type `string`. This contains the same information but properly handles document paths that don't conform to a valid RFC 3986 identifier.
37+
38+
## 2.1.0-beta.2 (2024-11-04)
39+
40+
This update brings compatibility with the Azure OpenAI `2024-10-01-preview` service API version as well as the `2.1.0-beta.2` release of the `OpenAI` library.
2041

2142
### Features Added
2243

@@ -25,21 +46,14 @@ This update brings compatibility with the Azure OpenAI `2024-10-01-preview` serv
2546
- Note 2: this feature is not yet compatible when using image input (a `ChatMessageContentPart` of `Kind` `Image`)
2647
- `2024-10-01-preview` further adds support for ungrounded content detection in chat completion content filter results via the `UngroundedMaterial` property on `ResponseContentFilterResult`, as retrieved from a chat completion via the `GetResponseContentFilterResult()` extension method.
2748

28-
Via `OpenAI 2.0.0-beta.2`:
49+
## Breaking Changes
2950

30-
- Made improvements to the experimental Realtime API. Please note this features area is currently under rapid development and not all changes may be reflected here.
31-
- Several types have been renamed for consistency and clarity.
32-
- ConversationRateLimitsUpdate (previously ConversationRateLimitsUpdatedUpdate) now includes named RequestDetails and TokenDetails properties, mapping to the corresponding named items in the underlying rate_limits command payload.
51+
- `[Experimental]` `ChatCitation` and `ChatRetrievedDocument` have each replaced the `Uri` property of type `System.Uri` with a `string` property named `Url`. This aligns with the REST specification and accounts for the wire value of `url` not always providing a valid RFC 3986 identifier [[azure-sdk-for-net \#46793](https://github.com/Azure/azure-sdk-for-net/issues/46793)]
3352

34-
### Bugs Fixed
53+
## Bugs Fixed
3554

36-
- Addressed an HTTP 401 issue that caused certain connection retry attempts, such as those triggered for HTTP 429 rate limiting errors, to sometimes generate a malformed request with multiple `Authorization` headers that would then be rejected. [#46401](https://github.com/Azure/azure-sdk-for-net/pull/46401)
3755
- Addressed an issue that caused `ChatCitation` and `ChatRetrievedDocument` to sometimes throw on deserialization, specifically when a returned value in the `url` JSON field was not populated with an RFC 3986 compliant identifier for `System.Uri` [[azure-sdk-for-net \#46793](https://github.com/Azure/azure-sdk-for-net/issues/46793)]
3856

39-
Via `OpenAI 2.0.0-beta.2`:
40-
41-
- Fixed serialization and deserialization of ConversationToolChoice literal values (such as "required").
42-
4357
## 2.1.0-beta.1 (2024-10-01)
4458

4559
Relative to the prior GA release, this update restores preview surfaces, retargeting to the latest `2024-08-01-preview` service `api-version` label. It also brings early support for the newly-announced `/realtime` capabilities with `gpt-4o-realtime-preview`. You can read more about Azure OpenAI support for `/realtime` in the annoucement post here: https://azure.microsoft.com/blog/announcing-new-products-and-features-for-azure-openai-service-including-gpt-4o-realtime-preview-with-audio-and-speech-capabilities/

sdk/openai/Azure.AI.OpenAI/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
3-
<AzureOpenAILibraryVersion>2.1.0-beta.2</AzureOpenAILibraryVersion>
3+
<AzureOpenAILibraryVersion>2.1.0</AzureOpenAILibraryVersion>
4+
<GAServiceVersionLabel>2024_10_21</GAServiceVersionLabel>
45
<!--
56
During development, we may want to get ahead of the published Nuget package versions. These next property flags
67
allow you to replace Nuget package references with external assembly .dll references, or even the source code
78
projects in a more simplified way.
89
-->
910
<!--
10-
<GAServiceVersionLabel>2024_06_01</GAServiceVersionLabel>
1111
<ExternalOpenAILibrary>../../external/OpenAI/netstandard2.0/OpenAI.dll</ExternalOpenAILibrary>
1212
<SystemClientModelVersion>1.1.0-beta.5</SystemClientModelVersion>
1313
<ExternalOpenAISource>../../external/OpenAI/src/OpenAI.csproj</ExternalOpenAISource>

sdk/openai/Azure.AI.OpenAI/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ These prerequisites allow you to create an Azure OpenAI resource and get both a
2222
Install the client library for .NET with [NuGet](https://www.nuget.org/):
2323

2424
```dotnetcli
25-
dotnet add package Azure.AI.OpenAI
25+
dotnet add package Azure.AI.OpenAI --prerelease
2626
```
2727

2828
The `Azure.AI.OpenAI` package builds on the [official OpenAI package](https://www.nuget.org/packages/OpenAI), which is included as a dependency.
@@ -66,7 +66,8 @@ AzureOpenAIClientOptions options = new()
6666
};
6767
AzureOpenAIClient azureClient = new(
6868
new Uri("https://your-azure-openai-resource.com"),
69-
new DefaultAzureCredential());
69+
new DefaultAzureCredential(),
70+
options);
7071
ChatClient chatClient = azureClient.GetChatClient("my-gpt-4o-mini-deployment");
7172
```
7273

0 commit comments

Comments
 (0)