Skip to content

Commit b585933

Browse files
authored
Azure OpenAI: 2.1.0-beta.1, including /realtime preview support (#46390)
* updates for 2.1.0-beta.1 * include export-api output * link verification placation * include restored assets.json for preview swap * assets.json update
1 parent e233d4b commit b585933

20 files changed

+867
-23
lines changed

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
</ItemGroup>
176176

177177
<ItemGroup Condition="$(MSBuildProjectName.StartsWith('Azure.AI.OpenAI'))">
178-
<PackageReference Update="OpenAI" Version="2.0.0" />
178+
<PackageReference Update="OpenAI" Version="2.1.0-beta.1" />
179179
</ItemGroup>
180180

181181
<!--

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

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

3+
## 2.1.0-beta.1 (2024-10-01)
4+
5+
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/
6+
7+
### Features Added
8+
9+
- Added a new `RealtimeConversationClient` in a corresponding scenario namespace. ([ff75da4](https://github.com/openai/openai-dotnet/commit/ff75da4167bc83fa85eb69ac142cab88a963ed06))
10+
- This maps to the new `/realtime` beta endpoint and is thus marked with a new `[Experimental("OPENAI002")]` diagnostic tag.
11+
- This is a very early version of the convenience surface and thus subject to significant change
12+
- Documentation and samples will arrive soon; in the interim, see the scenario test files (in `/tests`) for basic usage
13+
- You can also find an external sample employing this client, together with Azure OpenAI support, at https://github.com/Azure-Samples/aoai-realtime-audio-sdk/tree/main/dotnet/samples/console
14+
315
## 2.0.0 (2024-09-30)
416

517
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.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
3-
<GAServiceVersionLabel>2024_06_01</GAServiceVersionLabel>
43
<!--
54
During development, we may want to get ahead of the published Nuget package versions. These next property flags
65
allow you to replace Nuget package references with external assembly .dll references, or even the source code
76
projects in a more simplified way.
87
-->
98
<!--
9+
<GAServiceVersionLabel>2024_06_01</GAServiceVersionLabel>
1010
<ExternalOpenAILibrary>../../external/OpenAI/netstandard2.0/OpenAI.dll</ExternalOpenAILibrary>
1111
<SystemClientModelVersion>1.1.0-beta.5</SystemClientModelVersion>
1212
<ExternalOpenAISource>../../external/OpenAI/src/OpenAI.csproj</ExternalOpenAISource>

sdk/openai/Azure.AI.OpenAI/api/Azure.AI.OpenAI.netstandard2.0.cs

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,33 @@ public AzureOpenAIClient(System.Uri endpoint, Azure.Core.TokenCredential credent
2626
public AzureOpenAIClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.OpenAI.AzureOpenAIClientOptions options) { }
2727
public AzureOpenAIClient(System.Uri endpoint, System.ClientModel.ApiKeyCredential credential) { }
2828
public AzureOpenAIClient(System.Uri endpoint, System.ClientModel.ApiKeyCredential credential, Azure.AI.OpenAI.AzureOpenAIClientOptions options) { }
29-
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
3029
public override OpenAI.Assistants.AssistantClient GetAssistantClient() { throw null; }
3130
public override OpenAI.Audio.AudioClient GetAudioClient(string deploymentName) { throw null; }
3231
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
3332
public override OpenAI.Batch.BatchClient GetBatchClient() { throw null; }
34-
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
3533
public OpenAI.Batch.BatchClient GetBatchClient(string deploymentName) { throw null; }
3634
public override OpenAI.Chat.ChatClient GetChatClient(string deploymentName) { throw null; }
3735
public override OpenAI.Embeddings.EmbeddingClient GetEmbeddingClient(string deploymentName) { throw null; }
38-
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
3936
public override OpenAI.FineTuning.FineTuningClient GetFineTuningClient() { throw null; }
4037
public override OpenAI.Images.ImageClient GetImageClient(string deploymentName) { throw null; }
4138
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
4239
public override OpenAI.Moderations.ModerationClient GetModerationClient(string _) { throw null; }
43-
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
4440
public override OpenAI.Files.OpenAIFileClient GetOpenAIFileClient() { throw null; }
4541
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
4642
public override OpenAI.Models.OpenAIModelClient GetOpenAIModelClient() { throw null; }
47-
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
43+
public override OpenAI.RealtimeConversation.RealtimeConversationClient GetRealtimeConversationClient(string deploymentName) { throw null; }
4844
public override OpenAI.VectorStores.VectorStoreClient GetVectorStoreClient() { throw null; }
4945
}
5046
public partial class AzureOpenAIClientOptions : System.ClientModel.Primitives.ClientPipelineOptions
5147
{
52-
public AzureOpenAIClientOptions(Azure.AI.OpenAI.AzureOpenAIClientOptions.ServiceVersion version = Azure.AI.OpenAI.AzureOpenAIClientOptions.ServiceVersion.V2024_06_01) { }
48+
public AzureOpenAIClientOptions(Azure.AI.OpenAI.AzureOpenAIClientOptions.ServiceVersion version = Azure.AI.OpenAI.AzureOpenAIClientOptions.ServiceVersion.V2024_08_01_Preview) { }
5349
public Azure.AI.OpenAI.AzureOpenAIAudience? Audience { get { throw null; } set { } }
5450
public string UserAgentApplicationId { get { throw null; } set { } }
5551
public enum ServiceVersion
5652
{
5753
V2024_06_01 = 0,
54+
V2024_08_01_Preview = 1,
55+
V2024_10_01_Preview = 3,
5856
}
5957
}
6058
public partial class ContentFilterBlocklistResult : System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.ContentFilterBlocklistResult>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.ContentFilterBlocklistResult>
@@ -328,10 +326,14 @@ public CosmosChatDataSource() { }
328326
public abstract partial class DataSourceAuthentication : System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.DataSourceAuthentication>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.DataSourceAuthentication>
329327
{
330328
protected DataSourceAuthentication() { }
329+
public static Azure.AI.OpenAI.Chat.DataSourceAuthentication FromAccessToken(string accessToken) { throw null; }
331330
public static Azure.AI.OpenAI.Chat.DataSourceAuthentication FromApiKey(string apiKey) { throw null; }
332331
public static Azure.AI.OpenAI.Chat.DataSourceAuthentication FromConnectionString(string connectionString) { throw null; }
332+
public static Azure.AI.OpenAI.Chat.DataSourceAuthentication FromEncodedApiKey(string encodedApiKey) { throw null; }
333+
public static Azure.AI.OpenAI.Chat.DataSourceAuthentication FromKeyAndKeyId(string key, string keyId) { throw null; }
333334
public static Azure.AI.OpenAI.Chat.DataSourceAuthentication FromSystemManagedIdentity() { throw null; }
334335
public static Azure.AI.OpenAI.Chat.DataSourceAuthentication FromUserManagedIdentity(Azure.Core.ResourceIdentifier identityResource) { throw null; }
336+
public static Azure.AI.OpenAI.Chat.DataSourceAuthentication FromUsernameAndPassword(string username, string password) { throw null; }
335337
Azure.AI.OpenAI.Chat.DataSourceAuthentication System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.DataSourceAuthentication>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
336338
void System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.DataSourceAuthentication>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
337339
Azure.AI.OpenAI.Chat.DataSourceAuthentication System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.DataSourceAuthentication>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
@@ -387,36 +389,73 @@ public abstract partial class DataSourceVectorizer : System.ClientModel.Primitiv
387389
protected DataSourceVectorizer() { }
388390
public static Azure.AI.OpenAI.Chat.DataSourceVectorizer FromDeploymentName(string deploymentName) { throw null; }
389391
public static Azure.AI.OpenAI.Chat.DataSourceVectorizer FromEndpoint(System.Uri endpoint, Azure.AI.OpenAI.Chat.DataSourceAuthentication authentication) { throw null; }
392+
public static Azure.AI.OpenAI.Chat.DataSourceVectorizer FromIntegratedResource() { throw null; }
393+
public static Azure.AI.OpenAI.Chat.DataSourceVectorizer FromModelId(string modelId) { throw null; }
390394
Azure.AI.OpenAI.Chat.DataSourceVectorizer System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.DataSourceVectorizer>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
391395
void System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.DataSourceVectorizer>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
392396
Azure.AI.OpenAI.Chat.DataSourceVectorizer System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.DataSourceVectorizer>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
393397
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.DataSourceVectorizer>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
394398
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.DataSourceVectorizer>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
395399
}
396-
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
397400
public partial class ElasticsearchChatDataSource : Azure.AI.OpenAI.Chat.ChatDataSource, System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.ElasticsearchChatDataSource>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.ElasticsearchChatDataSource>
398401
{
402+
[System.ObsoleteAttribute("Constructors of types with required members are not supported in this version of your compiler.", true)]
399403
public ElasticsearchChatDataSource() { }
404+
public bool? AllowPartialResults { get { throw null; } set { } }
405+
public Azure.AI.OpenAI.Chat.DataSourceAuthentication Authentication { get { throw null; } set { } }
406+
public System.Uri Endpoint { get { throw null; } set { } }
407+
public Azure.AI.OpenAI.Chat.DataSourceFieldMappings FieldMappings { get { throw null; } set { } }
408+
public string IndexName { get { throw null; } set { } }
409+
public bool? InScope { get { throw null; } set { } }
410+
public int? MaxSearchQueries { get { throw null; } set { } }
411+
public Azure.AI.OpenAI.Chat.DataSourceOutputContexts? OutputContexts { get { throw null; } set { } }
412+
public Azure.AI.OpenAI.Chat.DataSourceQueryType? QueryType { get { throw null; } set { } }
413+
public int? Strictness { get { throw null; } set { } }
414+
public int? TopNDocuments { get { throw null; } set { } }
415+
public Azure.AI.OpenAI.Chat.DataSourceVectorizer VectorizationSource { get { throw null; } set { } }
400416
Azure.AI.OpenAI.Chat.ElasticsearchChatDataSource System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.ElasticsearchChatDataSource>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
401417
void System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.ElasticsearchChatDataSource>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
402418
Azure.AI.OpenAI.Chat.ElasticsearchChatDataSource System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.ElasticsearchChatDataSource>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
403419
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.ElasticsearchChatDataSource>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
404420
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.ElasticsearchChatDataSource>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
405421
}
406-
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
407422
public partial class MongoDBChatDataSource : Azure.AI.OpenAI.Chat.ChatDataSource, System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.MongoDBChatDataSource>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.MongoDBChatDataSource>
408423
{
424+
[System.ObsoleteAttribute("Constructors of types with required members are not supported in this version of your compiler.", true)]
409425
public MongoDBChatDataSource() { }
426+
public bool? AllowPartialResults { get { throw null; } set { } }
427+
public string AppName { get { throw null; } set { } }
428+
public Azure.AI.OpenAI.Chat.DataSourceAuthentication Authentication { get { throw null; } set { } }
429+
public string CollectionName { get { throw null; } set { } }
430+
public string EndpointName { get { throw null; } set { } }
431+
public string IndexName { get { throw null; } set { } }
432+
public bool? InScope { get { throw null; } set { } }
433+
public int? MaxSearchQueries { get { throw null; } set { } }
434+
public Azure.AI.OpenAI.Chat.DataSourceOutputContexts? OutputContexts { get { throw null; } set { } }
435+
public int? Strictness { get { throw null; } set { } }
436+
public int? TopNDocuments { get { throw null; } set { } }
437+
public Azure.AI.OpenAI.Chat.DataSourceVectorizer VectorizationSource { get { throw null; } set { } }
410438
Azure.AI.OpenAI.Chat.MongoDBChatDataSource System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.MongoDBChatDataSource>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
411439
void System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.MongoDBChatDataSource>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
412440
Azure.AI.OpenAI.Chat.MongoDBChatDataSource System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.MongoDBChatDataSource>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
413441
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.MongoDBChatDataSource>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
414442
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.MongoDBChatDataSource>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
415443
}
416-
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
417444
public partial class PineconeChatDataSource : Azure.AI.OpenAI.Chat.ChatDataSource, System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.PineconeChatDataSource>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.PineconeChatDataSource>
418445
{
446+
[System.ObsoleteAttribute("Constructors of types with required members are not supported in this version of your compiler.", true)]
419447
public PineconeChatDataSource() { }
448+
public bool? AllowPartialResults { get { throw null; } set { } }
449+
public Azure.AI.OpenAI.Chat.DataSourceAuthentication Authentication { get { throw null; } set { } }
450+
public string Environment { get { throw null; } set { } }
451+
public Azure.AI.OpenAI.Chat.DataSourceFieldMappings FieldMappings { get { throw null; } set { } }
452+
public string IndexName { get { throw null; } set { } }
453+
public bool? InScope { get { throw null; } set { } }
454+
public int? MaxSearchQueries { get { throw null; } set { } }
455+
public Azure.AI.OpenAI.Chat.DataSourceOutputContexts? OutputContexts { get { throw null; } set { } }
456+
public int? Strictness { get { throw null; } set { } }
457+
public int? TopNDocuments { get { throw null; } set { } }
458+
public Azure.AI.OpenAI.Chat.DataSourceVectorizer VectorizationSource { get { throw null; } set { } }
420459
Azure.AI.OpenAI.Chat.PineconeChatDataSource System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.PineconeChatDataSource>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
421460
void System.ClientModel.Primitives.IJsonModel<Azure.AI.OpenAI.Chat.PineconeChatDataSource>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
422461
Azure.AI.OpenAI.Chat.PineconeChatDataSource System.ClientModel.Primitives.IPersistableModel<Azure.AI.OpenAI.Chat.PineconeChatDataSource>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }

sdk/openai/Azure.AI.OpenAI/assets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "net",
44
"TagPrefix": "net/openai/Azure.AI.OpenAI",
5-
"Tag": "net/openai/Azure.AI.OpenAI_72fad5a839"
6-
}
5+
"Tag": "net/openai/Azure.AI.OpenAI_4c6b1909d6"
6+
}

sdk/openai/Azure.AI.OpenAI/src/Azure.AI.OpenAI.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
Azure OpenAI's official extension package for using OpenAI's .NET library with the Azure OpenAI Service.
66
</Description>
77
<AssemblyTitle>Azure.AI.OpenAI Client Library</AssemblyTitle>
8-
<VersionPrefix>2.0.0</VersionPrefix>
8+
<VersionPrefix>2.1.0</VersionPrefix>
99
<PackageTags>Microsoft Azure OpenAI</PackageTags>
1010
<DisableEnhancedAnalysis>true</DisableEnhancedAnalysis>
1111
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
1212
<GenerateAPIListing>true</GenerateAPIListing>
13-
<NoWarn>$(NoWarn);CS1591;AZC0012;AZC0102;CS8002;CS0436;AZC0112;OPENAI001</NoWarn>
13+
<NoWarn>$(NoWarn);CS1591;AZC0012;AZC0102;CS8002;CS0436;AZC0112;OPENAI001;OPENAI002</NoWarn>
1414
<ImplicitUsings>enable</ImplicitUsings>
1515
<LangVersion>preview</LangVersion>
1616
<Nullable>disable</Nullable>
@@ -31,7 +31,7 @@
3131
</When>
3232
<Otherwise>
3333
<PropertyGroup>
34-
<VersionSuffix>beta.6</VersionSuffix>
34+
<VersionSuffix>beta.1</VersionSuffix>
3535
</PropertyGroup>
3636
</Otherwise>
3737
</Choose>

0 commit comments

Comments
 (0)