diff --git a/OpenAI_DotNet.sln b/OpenAI_DotNet.sln
index f2f7b54..101a143 100644
--- a/OpenAI_DotNet.sln
+++ b/OpenAI_DotNet.sln
@@ -42,6 +42,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{130D40E9-8E3
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "internal", "internal", "{B28033FF-A6F3-48AC-824F-99996B1AC85E}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAI.GeneratedKiotaClient", "src\internal\OpenAI.GeneratedKiotaClient\OpenAI.GeneratedKiotaClient.csproj", "{095A8BD6-7B1F-4FB3-AD9E-2B98B138190B}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -96,6 +98,10 @@ Global
{F2968A66-5672-439E-823E-D35100CA067D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2968A66-5672-439E-823E-D35100CA067D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2968A66-5672-439E-823E-D35100CA067D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {095A8BD6-7B1F-4FB3-AD9E-2B98B138190B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {095A8BD6-7B1F-4FB3-AD9E-2B98B138190B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {095A8BD6-7B1F-4FB3-AD9E-2B98B138190B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {095A8BD6-7B1F-4FB3-AD9E-2B98B138190B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -115,5 +121,6 @@ Global
{DB6D8BCB-F003-4624-9277-3B4E1B7CDBCD} = {130D40E9-8E33-4EBA-8AE1-8B9479BC286A}
{068E9E67-C2FC-4F8C-B27C-CB3A8FA44BD8} = {130D40E9-8E33-4EBA-8AE1-8B9479BC286A}
{B28033FF-A6F3-48AC-824F-99996B1AC85E} = {130D40E9-8E33-4EBA-8AE1-8B9479BC286A}
+ {095A8BD6-7B1F-4FB3-AD9E-2B98B138190B} = {B28033FF-A6F3-48AC-824F-99996B1AC85E}
EndGlobalSection
EndGlobal
diff --git a/src/OpenAI.ChatGpt/AzureOpenAiClient.cs b/src/OpenAI.ChatGpt/AzureOpenAiClient.cs
index 6a8e3c1..b57b99e 100644
--- a/src/OpenAI.ChatGpt/AzureOpenAiClient.cs
+++ b/src/OpenAI.ChatGpt/AzureOpenAiClient.cs
@@ -12,8 +12,6 @@ public class AzureOpenAiClient : OpenAiClient
private readonly string _apiVersion;
private const string DefaultApiVersion = "2023-12-01-preview";
- //https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference
-
///
/// Creates Azure OpenAI services client
///
@@ -23,6 +21,7 @@ public class AzureOpenAiClient : OpenAiClient
/// Azure OpenAI API version
///
/// See currently available API versions: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#completions
+ /// Specifications: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference
///
public AzureOpenAiClient(
string endpointUrl,
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/GeneratedClientsFactory.cs b/src/internal/OpenAI.GeneratedKiotaClient/GeneratedClientsFactory.cs
new file mode 100644
index 0000000..36dc1d7
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/GeneratedClientsFactory.cs
@@ -0,0 +1,24 @@
+using Microsoft.Kiota.Abstractions.Authentication;
+using Microsoft.Kiota.Http.HttpClientLibrary;
+using OpenAI.Azure.GeneratedKiotaClient;
+
+namespace OpenAI.GeneratedKiotaClient;
+
+internal static class GeneratedClientsFactory
+{
+ public static GeneratedOpenAiClient CreateGeneratedOpenAiClient(HttpClient httpClient)
+ {
+ ArgumentNullException.ThrowIfNull(httpClient);
+ var authProvider = new AnonymousAuthenticationProvider();
+ var adapter = new HttpClientRequestAdapter(authProvider, httpClient: httpClient);
+ return new GeneratedOpenAiClient(adapter);
+ }
+
+ public static GeneratedAzureOpenAiClient CreateGeneratedAzureOpenAiClient(HttpClient httpClient)
+ {
+ ArgumentNullException.ThrowIfNull(httpClient);
+ var authProvider = new AnonymousAuthenticationProvider();
+ var adapter = new HttpClientRequestAdapter(authProvider, httpClient: httpClient);
+ return new GeneratedAzureOpenAiClient(adapter);
+ }
+}
\ No newline at end of file
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/OpenAI.GeneratedKiotaClient.csproj b/src/internal/OpenAI.GeneratedKiotaClient/OpenAI.GeneratedKiotaClient.csproj
new file mode 100644
index 0000000..664fb8e
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/OpenAI.GeneratedKiotaClient.csproj
@@ -0,0 +1,22 @@
+
+
+
+ net8.0
+ enable
+ enable
+ false
+ $(NoWarn);CS0618
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/DeploymentsRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/DeploymentsRequestBuilder.cs
new file mode 100644
index 0000000..b20e4e2
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/DeploymentsRequestBuilder.cs
@@ -0,0 +1,37 @@
+//
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments {
+ ///
+ /// Builds and executes requests for operations under \deployments
+ ///
+ internal class DeploymentsRequestBuilder : BaseRequestBuilder {
+ /// Gets an item from the OpenAI.Azure.GeneratedKiotaClient.deployments.item collection
+ /// Unique identifier of the item
+ public DeploymentItemRequestBuilder this[string position] { get {
+ var urlTplParams = new Dictionary(PathParameters);
+ urlTplParams.Add("deployment%2Did", position);
+ return new DeploymentItemRequestBuilder(urlTplParams, RequestAdapter);
+ } }
+ ///
+ /// Instantiates a new DeploymentsRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public DeploymentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments", pathParameters) {
+ }
+ ///
+ /// Instantiates a new DeploymentsRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public DeploymentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments", rawUrl) {
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Audio/AudioRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Audio/AudioRequestBuilder.cs
new file mode 100644
index 0000000..ab587b4
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Audio/AudioRequestBuilder.cs
@@ -0,0 +1,39 @@
+//
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Audio.Transcriptions;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Audio.Translations;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Audio {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\audio
+ ///
+ internal class AudioRequestBuilder : BaseRequestBuilder {
+ /// The transcriptions property
+ public TranscriptionsRequestBuilder Transcriptions { get =>
+ new TranscriptionsRequestBuilder(PathParameters, RequestAdapter);
+ }
+ /// The translations property
+ public TranslationsRequestBuilder Translations { get =>
+ new TranslationsRequestBuilder(PathParameters, RequestAdapter);
+ }
+ ///
+ /// Instantiates a new AudioRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public AudioRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/audio", pathParameters) {
+ }
+ ///
+ /// Instantiates a new AudioRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public AudioRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/audio", rawUrl) {
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Audio/Transcriptions/TranscriptionsRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Audio/Transcriptions/TranscriptionsRequestBuilder.cs
new file mode 100644
index 0000000..7cf6329
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Audio/Transcriptions/TranscriptionsRequestBuilder.cs
@@ -0,0 +1,259 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Models;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Threading;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Audio.Transcriptions {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\audio\transcriptions
+ ///
+ internal class TranscriptionsRequestBuilder : BaseRequestBuilder {
+ ///
+ /// Instantiates a new TranscriptionsRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public TranscriptionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/audio/transcriptions{?api%2Dversion*}", pathParameters) {
+ }
+ ///
+ /// Instantiates a new TranscriptionsRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public TranscriptionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/audio/transcriptions{?api%2Dversion*}", rawUrl) {
+ }
+ ///
+ /// Transcribes audio into the input language.
+ ///
+ /// Transcription request.
+ /// Cancellation token to use when cancelling requests
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public async Task PostAsTranscriptionsPostResponseAsync(MultipartBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) {
+#nullable restore
+#else
+ public async Task PostAsTranscriptionsPostResponseAsync(MultipartBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = ToPostRequestInformation(body, requestConfiguration);
+ return await RequestAdapter.SendAsync(requestInfo, TranscriptionsPostResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
+ }
+ ///
+ /// Transcribes audio into the input language.
+ ///
+ /// Transcription request.
+ /// Cancellation token to use when cancelling requests
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+ [Obsolete("This method is obsolete. Use PostAsTranscriptionsPostResponse instead.")]
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public async Task PostAsync(MultipartBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) {
+#nullable restore
+#else
+ public async Task PostAsync(MultipartBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = ToPostRequestInformation(body, requestConfiguration);
+ return await RequestAdapter.SendAsync(requestInfo, TranscriptionsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
+ }
+ ///
+ /// Transcribes audio into the input language.
+ ///
+ /// Transcription request.
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public RequestInformation ToPostRequestInformation(MultipartBody body, Action? requestConfiguration = default) {
+#nullable restore
+#else
+ public RequestInformation ToPostRequestInformation(MultipartBody body, Action requestConfiguration = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = new RequestInformation {
+ HttpMethod = Method.POST,
+ UrlTemplate = UrlTemplate,
+ PathParameters = PathParameters,
+ };
+ if (requestConfiguration != null) {
+ var requestConfig = new TranscriptionsRequestBuilderPostRequestConfiguration();
+ requestConfiguration.Invoke(requestConfig);
+ requestInfo.AddQueryParameters(requestConfig.QueryParameters);
+ requestInfo.AddRequestOptions(requestConfig.Options);
+ requestInfo.AddHeaders(requestConfig.Headers);
+ }
+ requestInfo.Headers.TryAdd("Accept", "application/json");
+ requestInfo.SetContentFromParsable(RequestAdapter, "multipart/form-data", body);
+ return requestInfo;
+ }
+ ///
+ /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
+ ///
+ /// The raw URL to use for the request builder.
+ public TranscriptionsRequestBuilder WithUrl(string rawUrl) {
+ return new TranscriptionsRequestBuilder(rawUrl, RequestAdapter);
+ }
+ ///
+ /// Composed type wrapper for classes audioResponse, audioVerboseResponse
+ ///
+ internal class TranscriptionsPostResponse : IComposedTypeWrapper, IParsable {
+ /// Composed type representation for type audioResponse
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse? AudioResponse { get; set; }
+#nullable restore
+#else
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse AudioResponse { get; set; }
+#endif
+ /// Composed type representation for type audioVerboseResponse
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse? AudioVerboseResponse { get; set; }
+#nullable restore
+#else
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse AudioVerboseResponse { get; set; }
+#endif
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static TranscriptionsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ var mappingValue = parseNode.GetChildNode("")?.GetStringValue();
+ var result = new TranscriptionsPostResponse();
+ if("audioResponse".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) {
+ result.AudioResponse = new OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse();
+ }
+ else if("audioVerboseResponse".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) {
+ result.AudioVerboseResponse = new OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse();
+ }
+ return result;
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ if(AudioResponse != null) {
+ return AudioResponse.GetFieldDeserializers();
+ }
+ else if(AudioVerboseResponse != null) {
+ return AudioVerboseResponse.GetFieldDeserializers();
+ }
+ return new Dictionary>();
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ if(AudioResponse != null) {
+ writer.WriteObjectValue(null, AudioResponse);
+ }
+ else if(AudioVerboseResponse != null) {
+ writer.WriteObjectValue(null, AudioVerboseResponse);
+ }
+ }
+ }
+ ///
+ /// Transcribes audio into the input language.
+ ///
+ internal class TranscriptionsRequestBuilderPostQueryParameters {
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ [QueryParameter("api%2Dversion")]
+ public string? ApiVersion { get; set; }
+#nullable restore
+#else
+ [QueryParameter("api%2Dversion")]
+ public string ApiVersion { get; set; }
+#endif
+ }
+ ///
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+ ///
+ internal class TranscriptionsRequestBuilderPostRequestConfiguration {
+ /// Request headers
+ public RequestHeaders Headers { get; set; }
+ /// Request options
+ public IList Options { get; set; }
+ /// Request query parameters
+ public TranscriptionsRequestBuilderPostQueryParameters QueryParameters { get; set; } = new TranscriptionsRequestBuilderPostQueryParameters();
+ ///
+ /// Instantiates a new transcriptionsRequestBuilderPostRequestConfiguration and sets the default values.
+ ///
+ public TranscriptionsRequestBuilderPostRequestConfiguration() {
+ Options = new List();
+ Headers = new RequestHeaders();
+ }
+ }
+ ///
+ /// Composed type wrapper for classes audioResponse, audioVerboseResponse
+ ///
+ internal class TranscriptionsResponse : IComposedTypeWrapper, IParsable {
+ /// Composed type representation for type audioResponse
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse? AudioResponse { get; set; }
+#nullable restore
+#else
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse AudioResponse { get; set; }
+#endif
+ /// Composed type representation for type audioVerboseResponse
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse? AudioVerboseResponse { get; set; }
+#nullable restore
+#else
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse AudioVerboseResponse { get; set; }
+#endif
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static TranscriptionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ var mappingValue = parseNode.GetChildNode("")?.GetStringValue();
+ var result = new TranscriptionsResponse();
+ if("audioResponse".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) {
+ result.AudioResponse = new OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse();
+ }
+ else if("audioVerboseResponse".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) {
+ result.AudioVerboseResponse = new OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse();
+ }
+ return result;
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ if(AudioResponse != null) {
+ return AudioResponse.GetFieldDeserializers();
+ }
+ else if(AudioVerboseResponse != null) {
+ return AudioVerboseResponse.GetFieldDeserializers();
+ }
+ return new Dictionary>();
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ if(AudioResponse != null) {
+ writer.WriteObjectValue(null, AudioResponse);
+ }
+ else if(AudioVerboseResponse != null) {
+ writer.WriteObjectValue(null, AudioVerboseResponse);
+ }
+ }
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Audio/Translations/TranslationsRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Audio/Translations/TranslationsRequestBuilder.cs
new file mode 100644
index 0000000..07f9f23
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Audio/Translations/TranslationsRequestBuilder.cs
@@ -0,0 +1,259 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Models;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Threading;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Audio.Translations {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\audio\translations
+ ///
+ internal class TranslationsRequestBuilder : BaseRequestBuilder {
+ ///
+ /// Instantiates a new TranslationsRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public TranslationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/audio/translations{?api%2Dversion*}", pathParameters) {
+ }
+ ///
+ /// Instantiates a new TranslationsRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public TranslationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/audio/translations{?api%2Dversion*}", rawUrl) {
+ }
+ ///
+ /// Transcribes and translates input audio into English text.
+ ///
+ /// Translation request.
+ /// Cancellation token to use when cancelling requests
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public async Task PostAsTranslationsPostResponseAsync(MultipartBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) {
+#nullable restore
+#else
+ public async Task PostAsTranslationsPostResponseAsync(MultipartBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = ToPostRequestInformation(body, requestConfiguration);
+ return await RequestAdapter.SendAsync(requestInfo, TranslationsPostResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
+ }
+ ///
+ /// Transcribes and translates input audio into English text.
+ ///
+ /// Translation request.
+ /// Cancellation token to use when cancelling requests
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+ [Obsolete("This method is obsolete. Use PostAsTranslationsPostResponse instead.")]
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public async Task PostAsync(MultipartBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) {
+#nullable restore
+#else
+ public async Task PostAsync(MultipartBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = ToPostRequestInformation(body, requestConfiguration);
+ return await RequestAdapter.SendAsync(requestInfo, TranslationsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
+ }
+ ///
+ /// Transcribes and translates input audio into English text.
+ ///
+ /// Translation request.
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public RequestInformation ToPostRequestInformation(MultipartBody body, Action? requestConfiguration = default) {
+#nullable restore
+#else
+ public RequestInformation ToPostRequestInformation(MultipartBody body, Action requestConfiguration = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = new RequestInformation {
+ HttpMethod = Method.POST,
+ UrlTemplate = UrlTemplate,
+ PathParameters = PathParameters,
+ };
+ if (requestConfiguration != null) {
+ var requestConfig = new TranslationsRequestBuilderPostRequestConfiguration();
+ requestConfiguration.Invoke(requestConfig);
+ requestInfo.AddQueryParameters(requestConfig.QueryParameters);
+ requestInfo.AddRequestOptions(requestConfig.Options);
+ requestInfo.AddHeaders(requestConfig.Headers);
+ }
+ requestInfo.Headers.TryAdd("Accept", "application/json");
+ requestInfo.SetContentFromParsable(RequestAdapter, "multipart/form-data", body);
+ return requestInfo;
+ }
+ ///
+ /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
+ ///
+ /// The raw URL to use for the request builder.
+ public TranslationsRequestBuilder WithUrl(string rawUrl) {
+ return new TranslationsRequestBuilder(rawUrl, RequestAdapter);
+ }
+ ///
+ /// Composed type wrapper for classes audioResponse, audioVerboseResponse
+ ///
+ internal class TranslationsPostResponse : IComposedTypeWrapper, IParsable {
+ /// Composed type representation for type audioResponse
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse? AudioResponse { get; set; }
+#nullable restore
+#else
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse AudioResponse { get; set; }
+#endif
+ /// Composed type representation for type audioVerboseResponse
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse? AudioVerboseResponse { get; set; }
+#nullable restore
+#else
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse AudioVerboseResponse { get; set; }
+#endif
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static TranslationsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ var mappingValue = parseNode.GetChildNode("")?.GetStringValue();
+ var result = new TranslationsPostResponse();
+ if("audioResponse".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) {
+ result.AudioResponse = new OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse();
+ }
+ else if("audioVerboseResponse".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) {
+ result.AudioVerboseResponse = new OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse();
+ }
+ return result;
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ if(AudioResponse != null) {
+ return AudioResponse.GetFieldDeserializers();
+ }
+ else if(AudioVerboseResponse != null) {
+ return AudioVerboseResponse.GetFieldDeserializers();
+ }
+ return new Dictionary>();
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ if(AudioResponse != null) {
+ writer.WriteObjectValue(null, AudioResponse);
+ }
+ else if(AudioVerboseResponse != null) {
+ writer.WriteObjectValue(null, AudioVerboseResponse);
+ }
+ }
+ }
+ ///
+ /// Transcribes and translates input audio into English text.
+ ///
+ internal class TranslationsRequestBuilderPostQueryParameters {
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ [QueryParameter("api%2Dversion")]
+ public string? ApiVersion { get; set; }
+#nullable restore
+#else
+ [QueryParameter("api%2Dversion")]
+ public string ApiVersion { get; set; }
+#endif
+ }
+ ///
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+ ///
+ internal class TranslationsRequestBuilderPostRequestConfiguration {
+ /// Request headers
+ public RequestHeaders Headers { get; set; }
+ /// Request options
+ public IList Options { get; set; }
+ /// Request query parameters
+ public TranslationsRequestBuilderPostQueryParameters QueryParameters { get; set; } = new TranslationsRequestBuilderPostQueryParameters();
+ ///
+ /// Instantiates a new translationsRequestBuilderPostRequestConfiguration and sets the default values.
+ ///
+ public TranslationsRequestBuilderPostRequestConfiguration() {
+ Options = new List();
+ Headers = new RequestHeaders();
+ }
+ }
+ ///
+ /// Composed type wrapper for classes audioResponse, audioVerboseResponse
+ ///
+ internal class TranslationsResponse : IComposedTypeWrapper, IParsable {
+ /// Composed type representation for type audioResponse
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse? AudioResponse { get; set; }
+#nullable restore
+#else
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse AudioResponse { get; set; }
+#endif
+ /// Composed type representation for type audioVerboseResponse
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse? AudioVerboseResponse { get; set; }
+#nullable restore
+#else
+ public OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse AudioVerboseResponse { get; set; }
+#endif
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static TranslationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ var mappingValue = parseNode.GetChildNode("")?.GetStringValue();
+ var result = new TranslationsResponse();
+ if("audioResponse".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) {
+ result.AudioResponse = new OpenAI.Azure.GeneratedKiotaClient.Models.AudioResponse();
+ }
+ else if("audioVerboseResponse".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) {
+ result.AudioVerboseResponse = new OpenAI.Azure.GeneratedKiotaClient.Models.AudioVerboseResponse();
+ }
+ return result;
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ if(AudioResponse != null) {
+ return AudioResponse.GetFieldDeserializers();
+ }
+ else if(AudioVerboseResponse != null) {
+ return AudioVerboseResponse.GetFieldDeserializers();
+ }
+ return new Dictionary>();
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ if(AudioResponse != null) {
+ writer.WriteObjectValue(null, AudioResponse);
+ }
+ else if(AudioVerboseResponse != null) {
+ writer.WriteObjectValue(null, AudioVerboseResponse);
+ }
+ }
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Chat/ChatRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Chat/ChatRequestBuilder.cs
new file mode 100644
index 0000000..2d8fd1d
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Chat/ChatRequestBuilder.cs
@@ -0,0 +1,34 @@
+//
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Chat.Completions;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Chat {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\chat
+ ///
+ internal class ChatRequestBuilder : BaseRequestBuilder {
+ /// The completions property
+ public CompletionsRequestBuilder Completions { get =>
+ new CompletionsRequestBuilder(PathParameters, RequestAdapter);
+ }
+ ///
+ /// Instantiates a new ChatRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public ChatRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/chat", pathParameters) {
+ }
+ ///
+ /// Instantiates a new ChatRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public ChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/chat", rawUrl) {
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Chat/Completions/CompletionsRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Chat/Completions/CompletionsRequestBuilder.cs
new file mode 100644
index 0000000..ee8de8b
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Chat/Completions/CompletionsRequestBuilder.cs
@@ -0,0 +1,121 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Models;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Threading;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Chat.Completions {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\chat\completions
+ ///
+ internal class CompletionsRequestBuilder : BaseRequestBuilder {
+ ///
+ /// Instantiates a new CompletionsRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public CompletionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/chat/completions{?api%2Dversion*}", pathParameters) {
+ }
+ ///
+ /// Instantiates a new CompletionsRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public CompletionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/chat/completions{?api%2Dversion*}", rawUrl) {
+ }
+ ///
+ /// Creates a completion for the chat message
+ ///
+ /// The request body
+ /// Cancellation token to use when cancelling requests
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public async Task PostAsync(CreateChatCompletionRequest body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) {
+#nullable restore
+#else
+ public async Task PostAsync(CreateChatCompletionRequest body, Action requestConfiguration = default, CancellationToken cancellationToken = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = ToPostRequestInformation(body, requestConfiguration);
+ var errorMapping = new Dictionary> {
+ {"4XX", ErrorResponse.CreateFromDiscriminatorValue},
+ {"5XX", ErrorResponse.CreateFromDiscriminatorValue},
+ };
+ return await RequestAdapter.SendAsync(requestInfo, CreateChatCompletionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
+ }
+ ///
+ /// Creates a completion for the chat message
+ ///
+ /// The request body
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public RequestInformation ToPostRequestInformation(CreateChatCompletionRequest body, Action? requestConfiguration = default) {
+#nullable restore
+#else
+ public RequestInformation ToPostRequestInformation(CreateChatCompletionRequest body, Action requestConfiguration = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = new RequestInformation {
+ HttpMethod = Method.POST,
+ UrlTemplate = UrlTemplate,
+ PathParameters = PathParameters,
+ };
+ if (requestConfiguration != null) {
+ var requestConfig = new CompletionsRequestBuilderPostRequestConfiguration();
+ requestConfiguration.Invoke(requestConfig);
+ requestInfo.AddQueryParameters(requestConfig.QueryParameters);
+ requestInfo.AddRequestOptions(requestConfig.Options);
+ requestInfo.AddHeaders(requestConfig.Headers);
+ }
+ requestInfo.Headers.TryAdd("Accept", "application/json");
+ requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
+ return requestInfo;
+ }
+ ///
+ /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
+ ///
+ /// The raw URL to use for the request builder.
+ public CompletionsRequestBuilder WithUrl(string rawUrl) {
+ return new CompletionsRequestBuilder(rawUrl, RequestAdapter);
+ }
+ ///
+ /// Creates a completion for the chat message
+ ///
+ internal class CompletionsRequestBuilderPostQueryParameters {
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ [QueryParameter("api%2Dversion")]
+ public string? ApiVersion { get; set; }
+#nullable restore
+#else
+ [QueryParameter("api%2Dversion")]
+ public string ApiVersion { get; set; }
+#endif
+ }
+ ///
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+ ///
+ internal class CompletionsRequestBuilderPostRequestConfiguration {
+ /// Request headers
+ public RequestHeaders Headers { get; set; }
+ /// Request options
+ public IList Options { get; set; }
+ /// Request query parameters
+ public CompletionsRequestBuilderPostQueryParameters QueryParameters { get; set; } = new CompletionsRequestBuilderPostQueryParameters();
+ ///
+ /// Instantiates a new completionsRequestBuilderPostRequestConfiguration and sets the default values.
+ ///
+ public CompletionsRequestBuilderPostRequestConfiguration() {
+ Options = new List();
+ Headers = new RequestHeaders();
+ }
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostRequestBody.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostRequestBody.cs
new file mode 100644
index 0000000..7cace50
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostRequestBody.cs
@@ -0,0 +1,226 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Completions {
+ internal class CompletionsPostRequestBody : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// Generates best_of completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed.When used with n, best_of controls the number of candidate completions and n specifies how many to return - best_of must be greater than n.Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop. Has maximum value of 128.
+ public int? BestOf { get; set; }
+ /// The completion_config property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? CompletionConfig { get; set; }
+#nullable restore
+#else
+ public string CompletionConfig { get; set; }
+#endif
+ /// Echo back the prompt in addition to the completion
+ public bool? Echo { get; set; }
+ /// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
+ public double? FrequencyPenalty { get; set; }
+ /// Defaults to null. Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this tokenizer tool (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass {"50256" : -100} to prevent the <|endoftext|> token from being generated.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public CompletionsPostRequestBody_logit_bias? LogitBias { get; set; }
+#nullable restore
+#else
+ public CompletionsPostRequestBody_logit_bias LogitBias { get; set; }
+#endif
+ /// Include the log probabilities on the logprobs most likely tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response.Minimum of 0 and maximum of 5 allowed.
+ public int? Logprobs { get; set; }
+ /// The token count of your prompt plus max_tokens cannot exceed the model's context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096). Has minimum of 0.
+ public int? MaxTokens { get; set; }
+ /// How many completions to generate for each prompt. Minimum of 1 and maximum of 128 allowed.Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop.
+ public int? N { get; set; }
+ /// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
+ public double? PresencePenalty { get; set; }
+ /// The prompt(s) to generate completions for, encoded as a string or array of strings.Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. Maximum allowed size of string list is 2048.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public CompletionsPostRequestBody_prompt? Prompt { get; set; }
+#nullable restore
+#else
+ public CompletionsPostRequestBody_prompt Prompt { get; set; }
+#endif
+ /// Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public CompletionsPostRequestBody_stop? Stop { get; set; }
+#nullable restore
+#else
+ public CompletionsPostRequestBody_stop Stop { get; set; }
+#endif
+ /// Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message.
+ public bool? Stream { get; set; }
+ /// The suffix that comes after a completion of inserted text.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? Suffix { get; set; }
+#nullable restore
+#else
+ public string Suffix { get; set; }
+#endif
+ /// What sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer.We generally recommend altering this or top_p but not both.
+ public double? Temperature { get; set; }
+ /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.We generally recommend altering this or temperature but not both.
+ public double? TopP { get; set; }
+ /// A unique identifier representing your end-user, which can help monitoring and detecting abuse
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? User { get; set; }
+#nullable restore
+#else
+ public string User { get; set; }
+#endif
+ ///
+ /// Instantiates a new completionsPostRequestBody and sets the default values.
+ ///
+ public CompletionsPostRequestBody() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static CompletionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new CompletionsPostRequestBody();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"best_of", n => { BestOf = n.GetIntValue(); } },
+ {"completion_config", n => { CompletionConfig = n.GetStringValue(); } },
+ {"echo", n => { Echo = n.GetBoolValue(); } },
+ {"frequency_penalty", n => { FrequencyPenalty = n.GetDoubleValue(); } },
+ {"logit_bias", n => { LogitBias = n.GetObjectValue(CompletionsPostRequestBody_logit_bias.CreateFromDiscriminatorValue); } },
+ {"logprobs", n => { Logprobs = n.GetIntValue(); } },
+ {"max_tokens", n => { MaxTokens = n.GetIntValue(); } },
+ {"n", n => { N = n.GetIntValue(); } },
+ {"presence_penalty", n => { PresencePenalty = n.GetDoubleValue(); } },
+ {"prompt", n => { Prompt = n.GetObjectValue(CompletionsPostRequestBody_prompt.CreateFromDiscriminatorValue); } },
+ {"stop", n => { Stop = n.GetObjectValue(CompletionsPostRequestBody_stop.CreateFromDiscriminatorValue); } },
+ {"stream", n => { Stream = n.GetBoolValue(); } },
+ {"suffix", n => { Suffix = n.GetStringValue(); } },
+ {"temperature", n => { Temperature = n.GetDoubleValue(); } },
+ {"top_p", n => { TopP = n.GetDoubleValue(); } },
+ {"user", n => { User = n.GetStringValue(); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteIntValue("best_of", BestOf);
+ writer.WriteStringValue("completion_config", CompletionConfig);
+ writer.WriteBoolValue("echo", Echo);
+ writer.WriteDoubleValue("frequency_penalty", FrequencyPenalty);
+ writer.WriteObjectValue("logit_bias", LogitBias);
+ writer.WriteIntValue("logprobs", Logprobs);
+ writer.WriteIntValue("max_tokens", MaxTokens);
+ writer.WriteIntValue("n", N);
+ writer.WriteDoubleValue("presence_penalty", PresencePenalty);
+ writer.WriteObjectValue("prompt", Prompt);
+ writer.WriteObjectValue("stop", Stop);
+ writer.WriteBoolValue("stream", Stream);
+ writer.WriteStringValue("suffix", Suffix);
+ writer.WriteDoubleValue("temperature", Temperature);
+ writer.WriteDoubleValue("top_p", TopP);
+ writer.WriteStringValue("user", User);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ ///
+ /// Composed type wrapper for classes string
+ ///
+ internal class CompletionsPostRequestBody_prompt : IComposedTypeWrapper, IParsable {
+ /// Composed type representation for type string
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? String { get; set; }
+#nullable restore
+#else
+ public string String { get; set; }
+#endif
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static CompletionsPostRequestBody_prompt CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ var mappingValue = parseNode.GetChildNode("")?.GetStringValue();
+ var result = new CompletionsPostRequestBody_prompt();
+ if(parseNode.GetStringValue() is string stringValue) {
+ result.String = stringValue;
+ }
+ return result;
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary>();
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ if(String != null) {
+ writer.WriteStringValue(null, String);
+ }
+ }
+ }
+ ///
+ /// Composed type wrapper for classes string
+ ///
+ internal class CompletionsPostRequestBody_stop : IComposedTypeWrapper, IParsable {
+ /// Composed type representation for type string
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? String { get; set; }
+#nullable restore
+#else
+ public string String { get; set; }
+#endif
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static CompletionsPostRequestBody_stop CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ var mappingValue = parseNode.GetChildNode("")?.GetStringValue();
+ var result = new CompletionsPostRequestBody_stop();
+ if(parseNode.GetStringValue() is string stringValue) {
+ result.String = stringValue;
+ }
+ return result;
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary>();
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ if(String != null) {
+ writer.WriteStringValue(null, String);
+ }
+ }
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostRequestBody_logit_bias.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostRequestBody_logit_bias.cs
new file mode 100644
index 0000000..8653ad0
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostRequestBody_logit_bias.cs
@@ -0,0 +1,45 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Completions {
+ ///
+ /// Defaults to null. Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this tokenizer tool (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass {"50256" : -100} to prevent the <|endoftext|> token from being generated.
+ ///
+ internal class CompletionsPostRequestBody_logit_bias : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ ///
+ /// Instantiates a new completionsPostRequestBody_logit_bias and sets the default values.
+ ///
+ public CompletionsPostRequestBody_logit_bias() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static CompletionsPostRequestBody_logit_bias CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new CompletionsPostRequestBody_logit_bias();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse.cs
new file mode 100644
index 0000000..1ed1185
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse.cs
@@ -0,0 +1,107 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using OpenAI.Azure.GeneratedKiotaClient.Models;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Completions {
+ internal class CompletionsPostResponse : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// The choices property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public List? Choices { get; set; }
+#nullable restore
+#else
+ public List Choices { get; set; }
+#endif
+ /// The created property
+ public int? Created { get; set; }
+ /// The id property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? Id { get; set; }
+#nullable restore
+#else
+ public string Id { get; set; }
+#endif
+ /// The model property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? Model { get; set; }
+#nullable restore
+#else
+ public string Model { get; set; }
+#endif
+ /// The object property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? Object { get; set; }
+#nullable restore
+#else
+ public string Object { get; set; }
+#endif
+ /// Content filtering results for zero or more prompts in the request. In a streaming request, results for different prompts may arrive at different times or in different orders.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public List? PromptFilterResults { get; set; }
+#nullable restore
+#else
+ public List PromptFilterResults { get; set; }
+#endif
+ /// The usage property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public CompletionsPostResponse_usage? Usage { get; set; }
+#nullable restore
+#else
+ public CompletionsPostResponse_usage Usage { get; set; }
+#endif
+ ///
+ /// Instantiates a new completionsPostResponse and sets the default values.
+ ///
+ public CompletionsPostResponse() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static CompletionsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new CompletionsPostResponse();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"choices", n => { Choices = n.GetCollectionOfObjectValues(CompletionsPostResponse_choices.CreateFromDiscriminatorValue)?.ToList(); } },
+ {"created", n => { Created = n.GetIntValue(); } },
+ {"id", n => { Id = n.GetStringValue(); } },
+ {"model", n => { Model = n.GetStringValue(); } },
+ {"object", n => { Object = n.GetStringValue(); } },
+ {"prompt_filter_results", n => { PromptFilterResults = n.GetCollectionOfObjectValues(PromptFilterResult.CreateFromDiscriminatorValue)?.ToList(); } },
+ {"usage", n => { Usage = n.GetObjectValue(CompletionsPostResponse_usage.CreateFromDiscriminatorValue); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteCollectionOfObjectValues("choices", Choices);
+ writer.WriteIntValue("created", Created);
+ writer.WriteStringValue("id", Id);
+ writer.WriteStringValue("model", Model);
+ writer.WriteStringValue("object", Object);
+ writer.WriteCollectionOfObjectValues("prompt_filter_results", PromptFilterResults);
+ writer.WriteObjectValue("usage", Usage);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_choices.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_choices.cs
new file mode 100644
index 0000000..4b96d4a
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_choices.cs
@@ -0,0 +1,87 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using OpenAI.Azure.GeneratedKiotaClient.Models;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Completions {
+ internal class CompletionsPostResponse_choices : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not. Information about third party text and profanity, if it has been detected, and if it has been filtered or not. And information about customer block list, if it has been filtered and its id.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public ContentFilterChoiceResults? ContentFilterResults { get; set; }
+#nullable restore
+#else
+ public ContentFilterChoiceResults ContentFilterResults { get; set; }
+#endif
+ /// The finish_reason property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? FinishReason { get; set; }
+#nullable restore
+#else
+ public string FinishReason { get; set; }
+#endif
+ /// The index property
+ public int? Index { get; set; }
+ /// The logprobs property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public CompletionsPostResponse_choices_logprobs? Logprobs { get; set; }
+#nullable restore
+#else
+ public CompletionsPostResponse_choices_logprobs Logprobs { get; set; }
+#endif
+ /// The text property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? Text { get; set; }
+#nullable restore
+#else
+ public string Text { get; set; }
+#endif
+ ///
+ /// Instantiates a new completionsPostResponse_choices and sets the default values.
+ ///
+ public CompletionsPostResponse_choices() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static CompletionsPostResponse_choices CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new CompletionsPostResponse_choices();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"content_filter_results", n => { ContentFilterResults = n.GetObjectValue(ContentFilterChoiceResults.CreateFromDiscriminatorValue); } },
+ {"finish_reason", n => { FinishReason = n.GetStringValue(); } },
+ {"index", n => { Index = n.GetIntValue(); } },
+ {"logprobs", n => { Logprobs = n.GetObjectValue(CompletionsPostResponse_choices_logprobs.CreateFromDiscriminatorValue); } },
+ {"text", n => { Text = n.GetStringValue(); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteObjectValue("content_filter_results", ContentFilterResults);
+ writer.WriteStringValue("finish_reason", FinishReason);
+ writer.WriteIntValue("index", Index);
+ writer.WriteObjectValue("logprobs", Logprobs);
+ writer.WriteStringValue("text", Text);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_choices_logprobs.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_choices_logprobs.cs
new file mode 100644
index 0000000..44fd3ae
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_choices_logprobs.cs
@@ -0,0 +1,82 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Completions {
+ internal class CompletionsPostResponse_choices_logprobs : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// The text_offset property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public List? TextOffset { get; set; }
+#nullable restore
+#else
+ public List TextOffset { get; set; }
+#endif
+ /// The token_logprobs property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public List? TokenLogprobs { get; set; }
+#nullable restore
+#else
+ public List TokenLogprobs { get; set; }
+#endif
+ /// The tokens property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public List? Tokens { get; set; }
+#nullable restore
+#else
+ public List Tokens { get; set; }
+#endif
+ /// The top_logprobs property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public List? TopLogprobs { get; set; }
+#nullable restore
+#else
+ public List TopLogprobs { get; set; }
+#endif
+ ///
+ /// Instantiates a new completionsPostResponse_choices_logprobs and sets the default values.
+ ///
+ public CompletionsPostResponse_choices_logprobs() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static CompletionsPostResponse_choices_logprobs CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new CompletionsPostResponse_choices_logprobs();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"text_offset", n => { TextOffset = n.GetCollectionOfPrimitiveValues()?.ToList(); } },
+ {"token_logprobs", n => { TokenLogprobs = n.GetCollectionOfPrimitiveValues()?.ToList(); } },
+ {"tokens", n => { Tokens = n.GetCollectionOfPrimitiveValues()?.ToList(); } },
+ {"top_logprobs", n => { TopLogprobs = n.GetCollectionOfObjectValues(CompletionsPostResponse_choices_logprobs_top_logprobs.CreateFromDiscriminatorValue)?.ToList(); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteCollectionOfPrimitiveValues("text_offset", TextOffset);
+ writer.WriteCollectionOfPrimitiveValues("token_logprobs", TokenLogprobs);
+ writer.WriteCollectionOfPrimitiveValues("tokens", Tokens);
+ writer.WriteCollectionOfObjectValues("top_logprobs", TopLogprobs);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_choices_logprobs_top_logprobs.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_choices_logprobs_top_logprobs.cs
new file mode 100644
index 0000000..2c2b5b6
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_choices_logprobs_top_logprobs.cs
@@ -0,0 +1,42 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Completions {
+ internal class CompletionsPostResponse_choices_logprobs_top_logprobs : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ ///
+ /// Instantiates a new completionsPostResponse_choices_logprobs_top_logprobs and sets the default values.
+ ///
+ public CompletionsPostResponse_choices_logprobs_top_logprobs() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static CompletionsPostResponse_choices_logprobs_top_logprobs CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new CompletionsPostResponse_choices_logprobs_top_logprobs();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_usage.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_usage.cs
new file mode 100644
index 0000000..c6345ae
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsPostResponse_usage.cs
@@ -0,0 +1,54 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Completions {
+ internal class CompletionsPostResponse_usage : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// The completion_tokens property
+ public int? CompletionTokens { get; set; }
+ /// The prompt_tokens property
+ public int? PromptTokens { get; set; }
+ /// The total_tokens property
+ public int? TotalTokens { get; set; }
+ ///
+ /// Instantiates a new completionsPostResponse_usage and sets the default values.
+ ///
+ public CompletionsPostResponse_usage() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static CompletionsPostResponse_usage CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new CompletionsPostResponse_usage();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"completion_tokens", n => { CompletionTokens = n.GetIntValue(); } },
+ {"prompt_tokens", n => { PromptTokens = n.GetIntValue(); } },
+ {"total_tokens", n => { TotalTokens = n.GetIntValue(); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteIntValue("completion_tokens", CompletionTokens);
+ writer.WriteIntValue("prompt_tokens", PromptTokens);
+ writer.WriteIntValue("total_tokens", TotalTokens);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsRequestBuilder.cs
new file mode 100644
index 0000000..3b9add7
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsRequestBuilder.cs
@@ -0,0 +1,143 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Models;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Threading;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Completions {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\completions
+ ///
+ internal class CompletionsRequestBuilder : BaseRequestBuilder {
+ ///
+ /// Instantiates a new CompletionsRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public CompletionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/completions{?api%2Dversion*}", pathParameters) {
+ }
+ ///
+ /// Instantiates a new CompletionsRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public CompletionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/completions{?api%2Dversion*}", rawUrl) {
+ }
+ ///
+ /// Creates a completion for the provided prompt, parameters and chosen model.
+ ///
+ /// The request body
+ /// Cancellation token to use when cancelling requests
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public async Task PostAsCompletionsPostResponseAsync(CompletionsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) {
+#nullable restore
+#else
+ public async Task PostAsCompletionsPostResponseAsync(CompletionsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = ToPostRequestInformation(body, requestConfiguration);
+ var errorMapping = new Dictionary> {
+ {"4XX", ErrorResponse.CreateFromDiscriminatorValue},
+ {"5XX", ErrorResponse.CreateFromDiscriminatorValue},
+ };
+ return await RequestAdapter.SendAsync(requestInfo, CompletionsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
+ }
+ ///
+ /// Creates a completion for the provided prompt, parameters and chosen model.
+ ///
+ /// The request body
+ /// Cancellation token to use when cancelling requests
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+ [Obsolete("This method is obsolete. Use PostAsCompletionsPostResponse instead.")]
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public async Task PostAsync(CompletionsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) {
+#nullable restore
+#else
+ public async Task PostAsync(CompletionsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = ToPostRequestInformation(body, requestConfiguration);
+ var errorMapping = new Dictionary> {
+ {"4XX", ErrorResponse.CreateFromDiscriminatorValue},
+ {"5XX", ErrorResponse.CreateFromDiscriminatorValue},
+ };
+ return await RequestAdapter.SendAsync(requestInfo, CompletionsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
+ }
+ ///
+ /// Creates a completion for the provided prompt, parameters and chosen model.
+ ///
+ /// The request body
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public RequestInformation ToPostRequestInformation(CompletionsPostRequestBody body, Action? requestConfiguration = default) {
+#nullable restore
+#else
+ public RequestInformation ToPostRequestInformation(CompletionsPostRequestBody body, Action requestConfiguration = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = new RequestInformation {
+ HttpMethod = Method.POST,
+ UrlTemplate = UrlTemplate,
+ PathParameters = PathParameters,
+ };
+ if (requestConfiguration != null) {
+ var requestConfig = new CompletionsRequestBuilderPostRequestConfiguration();
+ requestConfiguration.Invoke(requestConfig);
+ requestInfo.AddQueryParameters(requestConfig.QueryParameters);
+ requestInfo.AddRequestOptions(requestConfig.Options);
+ requestInfo.AddHeaders(requestConfig.Headers);
+ }
+ requestInfo.Headers.TryAdd("Accept", "application/json");
+ requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
+ return requestInfo;
+ }
+ ///
+ /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
+ ///
+ /// The raw URL to use for the request builder.
+ public CompletionsRequestBuilder WithUrl(string rawUrl) {
+ return new CompletionsRequestBuilder(rawUrl, RequestAdapter);
+ }
+ ///
+ /// Creates a completion for the provided prompt, parameters and chosen model.
+ ///
+ internal class CompletionsRequestBuilderPostQueryParameters {
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ [QueryParameter("api%2Dversion")]
+ public string? ApiVersion { get; set; }
+#nullable restore
+#else
+ [QueryParameter("api%2Dversion")]
+ public string ApiVersion { get; set; }
+#endif
+ }
+ ///
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+ ///
+ internal class CompletionsRequestBuilderPostRequestConfiguration {
+ /// Request headers
+ public RequestHeaders Headers { get; set; }
+ /// Request options
+ public IList Options { get; set; }
+ /// Request query parameters
+ public CompletionsRequestBuilderPostQueryParameters QueryParameters { get; set; } = new CompletionsRequestBuilderPostQueryParameters();
+ ///
+ /// Instantiates a new completionsRequestBuilderPostRequestConfiguration and sets the default values.
+ ///
+ public CompletionsRequestBuilderPostRequestConfiguration() {
+ Options = new List();
+ Headers = new RequestHeaders();
+ }
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsResponse.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsResponse.cs
new file mode 100644
index 0000000..b73d043
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Completions/CompletionsResponse.cs
@@ -0,0 +1,20 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Completions {
+ [Obsolete("This class is obsolete. Use completionsPostResponse instead.")]
+ internal class CompletionsResponse : CompletionsPostResponse, IParsable {
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static new CompletionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new CompletionsResponse();
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/DeploymentItemRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/DeploymentItemRequestBuilder.cs
new file mode 100644
index 0000000..5458bee
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/DeploymentItemRequestBuilder.cs
@@ -0,0 +1,59 @@
+//
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Audio;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Chat;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Completions;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Embeddings;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Extensions;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Images;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}
+ ///
+ internal class DeploymentItemRequestBuilder : BaseRequestBuilder {
+ /// The audio property
+ public AudioRequestBuilder Audio { get =>
+ new AudioRequestBuilder(PathParameters, RequestAdapter);
+ }
+ /// The chat property
+ public ChatRequestBuilder Chat { get =>
+ new ChatRequestBuilder(PathParameters, RequestAdapter);
+ }
+ /// The completions property
+ public CompletionsRequestBuilder Completions { get =>
+ new CompletionsRequestBuilder(PathParameters, RequestAdapter);
+ }
+ /// The embeddings property
+ public EmbeddingsRequestBuilder Embeddings { get =>
+ new EmbeddingsRequestBuilder(PathParameters, RequestAdapter);
+ }
+ /// The extensions property
+ public ExtensionsRequestBuilder Extensions { get =>
+ new ExtensionsRequestBuilder(PathParameters, RequestAdapter);
+ }
+ /// The images property
+ public ImagesRequestBuilder Images { get =>
+ new ImagesRequestBuilder(PathParameters, RequestAdapter);
+ }
+ ///
+ /// Instantiates a new DeploymentItemRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public DeploymentItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}", pathParameters) {
+ }
+ ///
+ /// Instantiates a new DeploymentItemRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public DeploymentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}", rawUrl) {
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostRequestBody.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostRequestBody.cs
new file mode 100644
index 0000000..7d09b35
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostRequestBody.cs
@@ -0,0 +1,114 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Embeddings {
+ internal class EmbeddingsPostRequestBody : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// Input text to get embeddings for, encoded as a string. To get embeddings for multiple inputs in a single request, pass an array of strings. Each input must not exceed 2048 tokens in length.Unless you are embedding code, we suggest replacing newlines (\n) in your input with a single space, as we have observed inferior results when newlines are present.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public EmbeddingsPostRequestBody_input? Input { get; set; }
+#nullable restore
+#else
+ public EmbeddingsPostRequestBody_input Input { get; set; }
+#endif
+ /// input type of embedding search to use
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? InputType { get; set; }
+#nullable restore
+#else
+ public string InputType { get; set; }
+#endif
+ /// A unique identifier representing your end-user, which can help monitoring and detecting abuse.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? User { get; set; }
+#nullable restore
+#else
+ public string User { get; set; }
+#endif
+ ///
+ /// Instantiates a new embeddingsPostRequestBody and sets the default values.
+ ///
+ public EmbeddingsPostRequestBody() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static EmbeddingsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new EmbeddingsPostRequestBody();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"input", n => { Input = n.GetObjectValue(EmbeddingsPostRequestBody_input.CreateFromDiscriminatorValue); } },
+ {"input_type", n => { InputType = n.GetStringValue(); } },
+ {"user", n => { User = n.GetStringValue(); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteObjectValue("input", Input);
+ writer.WriteStringValue("input_type", InputType);
+ writer.WriteStringValue("user", User);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ ///
+ /// Composed type wrapper for classes string
+ ///
+ internal class EmbeddingsPostRequestBody_input : IComposedTypeWrapper, IParsable {
+ /// Composed type representation for type string
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? String { get; set; }
+#nullable restore
+#else
+ public string String { get; set; }
+#endif
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static EmbeddingsPostRequestBody_input CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ var mappingValue = parseNode.GetChildNode("")?.GetStringValue();
+ var result = new EmbeddingsPostRequestBody_input();
+ if(parseNode.GetStringValue() is string stringValue) {
+ result.String = stringValue;
+ }
+ return result;
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary>();
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ if(String != null) {
+ writer.WriteStringValue(null, String);
+ }
+ }
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostResponse.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostResponse.cs
new file mode 100644
index 0000000..332ee3c
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostResponse.cs
@@ -0,0 +1,82 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Embeddings {
+ internal class EmbeddingsPostResponse : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// The data property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public List? Data { get; set; }
+#nullable restore
+#else
+ public List Data { get; set; }
+#endif
+ /// The model property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? Model { get; set; }
+#nullable restore
+#else
+ public string Model { get; set; }
+#endif
+ /// The object property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? Object { get; set; }
+#nullable restore
+#else
+ public string Object { get; set; }
+#endif
+ /// The usage property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public EmbeddingsPostResponse_usage? Usage { get; set; }
+#nullable restore
+#else
+ public EmbeddingsPostResponse_usage Usage { get; set; }
+#endif
+ ///
+ /// Instantiates a new embeddingsPostResponse and sets the default values.
+ ///
+ public EmbeddingsPostResponse() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static EmbeddingsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new EmbeddingsPostResponse();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"data", n => { Data = n.GetCollectionOfObjectValues(EmbeddingsPostResponse_data.CreateFromDiscriminatorValue)?.ToList(); } },
+ {"model", n => { Model = n.GetStringValue(); } },
+ {"object", n => { Object = n.GetStringValue(); } },
+ {"usage", n => { Usage = n.GetObjectValue(EmbeddingsPostResponse_usage.CreateFromDiscriminatorValue); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteCollectionOfObjectValues("data", Data);
+ writer.WriteStringValue("model", Model);
+ writer.WriteStringValue("object", Object);
+ writer.WriteObjectValue("usage", Usage);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostResponse_data.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostResponse_data.cs
new file mode 100644
index 0000000..0f6c8c6
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostResponse_data.cs
@@ -0,0 +1,66 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Embeddings {
+ internal class EmbeddingsPostResponse_data : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// The embedding property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public List? Embedding { get; set; }
+#nullable restore
+#else
+ public List Embedding { get; set; }
+#endif
+ /// The index property
+ public int? Index { get; set; }
+ /// The object property
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? Object { get; set; }
+#nullable restore
+#else
+ public string Object { get; set; }
+#endif
+ ///
+ /// Instantiates a new embeddingsPostResponse_data and sets the default values.
+ ///
+ public EmbeddingsPostResponse_data() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static EmbeddingsPostResponse_data CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new EmbeddingsPostResponse_data();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"embedding", n => { Embedding = n.GetCollectionOfPrimitiveValues()?.ToList(); } },
+ {"index", n => { Index = n.GetIntValue(); } },
+ {"object", n => { Object = n.GetStringValue(); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteCollectionOfPrimitiveValues("embedding", Embedding);
+ writer.WriteIntValue("index", Index);
+ writer.WriteStringValue("object", Object);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostResponse_usage.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostResponse_usage.cs
new file mode 100644
index 0000000..5283cc5
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsPostResponse_usage.cs
@@ -0,0 +1,50 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Embeddings {
+ internal class EmbeddingsPostResponse_usage : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// The prompt_tokens property
+ public int? PromptTokens { get; set; }
+ /// The total_tokens property
+ public int? TotalTokens { get; set; }
+ ///
+ /// Instantiates a new embeddingsPostResponse_usage and sets the default values.
+ ///
+ public EmbeddingsPostResponse_usage() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static EmbeddingsPostResponse_usage CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new EmbeddingsPostResponse_usage();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"prompt_tokens", n => { PromptTokens = n.GetIntValue(); } },
+ {"total_tokens", n => { TotalTokens = n.GetIntValue(); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteIntValue("prompt_tokens", PromptTokens);
+ writer.WriteIntValue("total_tokens", TotalTokens);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsRequestBuilder.cs
new file mode 100644
index 0000000..b2d8ce2
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsRequestBuilder.cs
@@ -0,0 +1,134 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using Microsoft.Kiota.Abstractions;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Threading;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Embeddings {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\embeddings
+ ///
+ internal class EmbeddingsRequestBuilder : BaseRequestBuilder {
+ ///
+ /// Instantiates a new EmbeddingsRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public EmbeddingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/embeddings{?api%2Dversion*}", pathParameters) {
+ }
+ ///
+ /// Instantiates a new EmbeddingsRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public EmbeddingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/embeddings{?api%2Dversion*}", rawUrl) {
+ }
+ ///
+ /// Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
+ ///
+ /// The request body
+ /// Cancellation token to use when cancelling requests
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public async Task PostAsEmbeddingsPostResponseAsync(EmbeddingsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) {
+#nullable restore
+#else
+ public async Task PostAsEmbeddingsPostResponseAsync(EmbeddingsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = ToPostRequestInformation(body, requestConfiguration);
+ return await RequestAdapter.SendAsync(requestInfo, EmbeddingsPostResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
+ }
+ ///
+ /// Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
+ ///
+ /// The request body
+ /// Cancellation token to use when cancelling requests
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+ [Obsolete("This method is obsolete. Use PostAsEmbeddingsPostResponse instead.")]
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public async Task PostAsync(EmbeddingsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) {
+#nullable restore
+#else
+ public async Task PostAsync(EmbeddingsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = ToPostRequestInformation(body, requestConfiguration);
+ return await RequestAdapter.SendAsync(requestInfo, EmbeddingsResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false);
+ }
+ ///
+ /// Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
+ ///
+ /// The request body
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public RequestInformation ToPostRequestInformation(EmbeddingsPostRequestBody body, Action? requestConfiguration = default) {
+#nullable restore
+#else
+ public RequestInformation ToPostRequestInformation(EmbeddingsPostRequestBody body, Action requestConfiguration = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = new RequestInformation {
+ HttpMethod = Method.POST,
+ UrlTemplate = UrlTemplate,
+ PathParameters = PathParameters,
+ };
+ if (requestConfiguration != null) {
+ var requestConfig = new EmbeddingsRequestBuilderPostRequestConfiguration();
+ requestConfiguration.Invoke(requestConfig);
+ requestInfo.AddQueryParameters(requestConfig.QueryParameters);
+ requestInfo.AddRequestOptions(requestConfig.Options);
+ requestInfo.AddHeaders(requestConfig.Headers);
+ }
+ requestInfo.Headers.TryAdd("Accept", "application/json");
+ requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
+ return requestInfo;
+ }
+ ///
+ /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
+ ///
+ /// The raw URL to use for the request builder.
+ public EmbeddingsRequestBuilder WithUrl(string rawUrl) {
+ return new EmbeddingsRequestBuilder(rawUrl, RequestAdapter);
+ }
+ ///
+ /// Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
+ ///
+ internal class EmbeddingsRequestBuilderPostQueryParameters {
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ [QueryParameter("api%2Dversion")]
+ public string? ApiVersion { get; set; }
+#nullable restore
+#else
+ [QueryParameter("api%2Dversion")]
+ public string ApiVersion { get; set; }
+#endif
+ }
+ ///
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+ ///
+ internal class EmbeddingsRequestBuilderPostRequestConfiguration {
+ /// Request headers
+ public RequestHeaders Headers { get; set; }
+ /// Request options
+ public IList Options { get; set; }
+ /// Request query parameters
+ public EmbeddingsRequestBuilderPostQueryParameters QueryParameters { get; set; } = new EmbeddingsRequestBuilderPostQueryParameters();
+ ///
+ /// Instantiates a new embeddingsRequestBuilderPostRequestConfiguration and sets the default values.
+ ///
+ public EmbeddingsRequestBuilderPostRequestConfiguration() {
+ Options = new List();
+ Headers = new RequestHeaders();
+ }
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsResponse.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsResponse.cs
new file mode 100644
index 0000000..e9cf801
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Embeddings/EmbeddingsResponse.cs
@@ -0,0 +1,20 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Embeddings {
+ [Obsolete("This class is obsolete. Use embeddingsPostResponse instead.")]
+ internal class EmbeddingsResponse : EmbeddingsPostResponse, IParsable {
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static new EmbeddingsResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new EmbeddingsResponse();
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Extensions/Chat/ChatRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Extensions/Chat/ChatRequestBuilder.cs
new file mode 100644
index 0000000..9c55ada
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Extensions/Chat/ChatRequestBuilder.cs
@@ -0,0 +1,34 @@
+//
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Extensions.Chat.Completions;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Extensions.Chat {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\extensions\chat
+ ///
+ internal class ChatRequestBuilder : BaseRequestBuilder {
+ /// The completions property
+ public CompletionsRequestBuilder Completions { get =>
+ new CompletionsRequestBuilder(PathParameters, RequestAdapter);
+ }
+ ///
+ /// Instantiates a new ChatRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public ChatRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/extensions/chat", pathParameters) {
+ }
+ ///
+ /// Instantiates a new ChatRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public ChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/extensions/chat", rawUrl) {
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Extensions/Chat/Completions/CompletionsRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Extensions/Chat/Completions/CompletionsRequestBuilder.cs
new file mode 100644
index 0000000..e206d8a
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Extensions/Chat/Completions/CompletionsRequestBuilder.cs
@@ -0,0 +1,121 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Models;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Threading;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Extensions.Chat.Completions {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\extensions\chat\completions
+ ///
+ internal class CompletionsRequestBuilder : BaseRequestBuilder {
+ ///
+ /// Instantiates a new CompletionsRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public CompletionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/extensions/chat/completions{?api%2Dversion*}", pathParameters) {
+ }
+ ///
+ /// Instantiates a new CompletionsRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public CompletionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/extensions/chat/completions{?api%2Dversion*}", rawUrl) {
+ }
+ ///
+ /// Using extensions to creates a completion for the chat messages.
+ ///
+ /// Request for the chat completions using extensions
+ /// Cancellation token to use when cancelling requests
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public async Task PostAsync(ExtensionsChatCompletionsRequest body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) {
+#nullable restore
+#else
+ public async Task PostAsync(ExtensionsChatCompletionsRequest body, Action requestConfiguration = default, CancellationToken cancellationToken = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = ToPostRequestInformation(body, requestConfiguration);
+ var errorMapping = new Dictionary> {
+ {"4XX", ErrorResponse.CreateFromDiscriminatorValue},
+ {"5XX", ErrorResponse.CreateFromDiscriminatorValue},
+ };
+ return await RequestAdapter.SendAsync(requestInfo, ExtensionsChatCompletionsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
+ }
+ ///
+ /// Using extensions to creates a completion for the chat messages.
+ ///
+ /// Request for the chat completions using extensions
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public RequestInformation ToPostRequestInformation(ExtensionsChatCompletionsRequest body, Action? requestConfiguration = default) {
+#nullable restore
+#else
+ public RequestInformation ToPostRequestInformation(ExtensionsChatCompletionsRequest body, Action requestConfiguration = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = new RequestInformation {
+ HttpMethod = Method.POST,
+ UrlTemplate = UrlTemplate,
+ PathParameters = PathParameters,
+ };
+ if (requestConfiguration != null) {
+ var requestConfig = new CompletionsRequestBuilderPostRequestConfiguration();
+ requestConfiguration.Invoke(requestConfig);
+ requestInfo.AddQueryParameters(requestConfig.QueryParameters);
+ requestInfo.AddRequestOptions(requestConfig.Options);
+ requestInfo.AddHeaders(requestConfig.Headers);
+ }
+ requestInfo.Headers.TryAdd("Accept", "application/json");
+ requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
+ return requestInfo;
+ }
+ ///
+ /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
+ ///
+ /// The raw URL to use for the request builder.
+ public CompletionsRequestBuilder WithUrl(string rawUrl) {
+ return new CompletionsRequestBuilder(rawUrl, RequestAdapter);
+ }
+ ///
+ /// Using extensions to creates a completion for the chat messages.
+ ///
+ internal class CompletionsRequestBuilderPostQueryParameters {
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ [QueryParameter("api%2Dversion")]
+ public string? ApiVersion { get; set; }
+#nullable restore
+#else
+ [QueryParameter("api%2Dversion")]
+ public string ApiVersion { get; set; }
+#endif
+ }
+ ///
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+ ///
+ internal class CompletionsRequestBuilderPostRequestConfiguration {
+ /// Request headers
+ public RequestHeaders Headers { get; set; }
+ /// Request options
+ public IList Options { get; set; }
+ /// Request query parameters
+ public CompletionsRequestBuilderPostQueryParameters QueryParameters { get; set; } = new CompletionsRequestBuilderPostQueryParameters();
+ ///
+ /// Instantiates a new completionsRequestBuilderPostRequestConfiguration and sets the default values.
+ ///
+ public CompletionsRequestBuilderPostRequestConfiguration() {
+ Options = new List();
+ Headers = new RequestHeaders();
+ }
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Extensions/ExtensionsRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Extensions/ExtensionsRequestBuilder.cs
new file mode 100644
index 0000000..e0325df
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Extensions/ExtensionsRequestBuilder.cs
@@ -0,0 +1,34 @@
+//
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Extensions.Chat;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Extensions {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\extensions
+ ///
+ internal class ExtensionsRequestBuilder : BaseRequestBuilder {
+ /// The chat property
+ public ChatRequestBuilder Chat { get =>
+ new ChatRequestBuilder(PathParameters, RequestAdapter);
+ }
+ ///
+ /// Instantiates a new ExtensionsRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public ExtensionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/extensions", pathParameters) {
+ }
+ ///
+ /// Instantiates a new ExtensionsRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/extensions", rawUrl) {
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Images/Generations/GenerationsRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Images/Generations/GenerationsRequestBuilder.cs
new file mode 100644
index 0000000..3d34392
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Images/Generations/GenerationsRequestBuilder.cs
@@ -0,0 +1,121 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Models;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Threading;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Images.Generations {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\images\generations
+ ///
+ internal class GenerationsRequestBuilder : BaseRequestBuilder {
+ ///
+ /// Instantiates a new GenerationsRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public GenerationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/images/generations{?api%2Dversion*}", pathParameters) {
+ }
+ ///
+ /// Instantiates a new GenerationsRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public GenerationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/images/generations{?api%2Dversion*}", rawUrl) {
+ }
+ ///
+ /// Generates a batch of images from a text caption on a given DALLE model deployment
+ ///
+ /// The request body
+ /// Cancellation token to use when cancelling requests
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public async Task PostAsync(ImageGenerationsRequest body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) {
+#nullable restore
+#else
+ public async Task PostAsync(ImageGenerationsRequest body, Action requestConfiguration = default, CancellationToken cancellationToken = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = ToPostRequestInformation(body, requestConfiguration);
+ var errorMapping = new Dictionary> {
+ {"4XX", ErrorResponse.CreateFromDiscriminatorValue},
+ {"5XX", ErrorResponse.CreateFromDiscriminatorValue},
+ };
+ return await RequestAdapter.SendAsync(requestInfo, GenerateImagesResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
+ }
+ ///
+ /// Generates a batch of images from a text caption on a given DALLE model deployment
+ ///
+ /// The request body
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public RequestInformation ToPostRequestInformation(ImageGenerationsRequest body, Action? requestConfiguration = default) {
+#nullable restore
+#else
+ public RequestInformation ToPostRequestInformation(ImageGenerationsRequest body, Action requestConfiguration = default) {
+#endif
+ _ = body ?? throw new ArgumentNullException(nameof(body));
+ var requestInfo = new RequestInformation {
+ HttpMethod = Method.POST,
+ UrlTemplate = UrlTemplate,
+ PathParameters = PathParameters,
+ };
+ if (requestConfiguration != null) {
+ var requestConfig = new GenerationsRequestBuilderPostRequestConfiguration();
+ requestConfiguration.Invoke(requestConfig);
+ requestInfo.AddQueryParameters(requestConfig.QueryParameters);
+ requestInfo.AddRequestOptions(requestConfig.Options);
+ requestInfo.AddHeaders(requestConfig.Headers);
+ }
+ requestInfo.Headers.TryAdd("Accept", "application/json");
+ requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
+ return requestInfo;
+ }
+ ///
+ /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
+ ///
+ /// The raw URL to use for the request builder.
+ public GenerationsRequestBuilder WithUrl(string rawUrl) {
+ return new GenerationsRequestBuilder(rawUrl, RequestAdapter);
+ }
+ ///
+ /// Generates a batch of images from a text caption on a given DALLE model deployment
+ ///
+ internal class GenerationsRequestBuilderPostQueryParameters {
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ [QueryParameter("api%2Dversion")]
+ public string? ApiVersion { get; set; }
+#nullable restore
+#else
+ [QueryParameter("api%2Dversion")]
+ public string ApiVersion { get; set; }
+#endif
+ }
+ ///
+ /// Configuration for the request such as headers, query parameters, and middleware options.
+ ///
+ internal class GenerationsRequestBuilderPostRequestConfiguration {
+ /// Request headers
+ public RequestHeaders Headers { get; set; }
+ /// Request options
+ public IList Options { get; set; }
+ /// Request query parameters
+ public GenerationsRequestBuilderPostQueryParameters QueryParameters { get; set; } = new GenerationsRequestBuilderPostQueryParameters();
+ ///
+ /// Instantiates a new generationsRequestBuilderPostRequestConfiguration and sets the default values.
+ ///
+ public GenerationsRequestBuilderPostRequestConfiguration() {
+ Options = new List();
+ Headers = new RequestHeaders();
+ }
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Images/ImagesRequestBuilder.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Images/ImagesRequestBuilder.cs
new file mode 100644
index 0000000..a1cc4c5
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Deployments/Item/Images/ImagesRequestBuilder.cs
@@ -0,0 +1,34 @@
+//
+using Microsoft.Kiota.Abstractions;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Images.Generations;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Deployments.Item.Images {
+ ///
+ /// Builds and executes requests for operations under \deployments\{deployment-id}\images
+ ///
+ internal class ImagesRequestBuilder : BaseRequestBuilder {
+ /// The generations property
+ public GenerationsRequestBuilder Generations { get =>
+ new GenerationsRequestBuilder(PathParameters, RequestAdapter);
+ }
+ ///
+ /// Instantiates a new ImagesRequestBuilder and sets the default values.
+ ///
+ /// Path parameters for the request
+ /// The request adapter to use to execute the requests.
+ public ImagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/images", pathParameters) {
+ }
+ ///
+ /// Instantiates a new ImagesRequestBuilder and sets the default values.
+ ///
+ /// The raw URL to use for the request builder.
+ /// The request adapter to use to execute the requests.
+ public ImagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/deployments/{deployment%2Did}/images", rawUrl) {
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/GeneratedAzureOpenAiClient.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/GeneratedAzureOpenAiClient.cs
new file mode 100644
index 0000000..4898b08
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/GeneratedAzureOpenAiClient.cs
@@ -0,0 +1,34 @@
+//
+using Microsoft.Kiota.Abstractions.Extensions;
+using Microsoft.Kiota.Abstractions;
+using Microsoft.Kiota.Serialization.Json;
+using OpenAI.Azure.GeneratedKiotaClient.Deployments;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient {
+ ///
+ /// The main entry point of the SDK, exposes the configuration and the fluent API.
+ ///
+ internal class GeneratedAzureOpenAiClient : BaseRequestBuilder {
+ /// The deployments property
+ public DeploymentsRequestBuilder Deployments { get =>
+ new DeploymentsRequestBuilder(PathParameters, RequestAdapter);
+ }
+ ///
+ /// Instantiates a new GeneratedAzureOpenAiClient and sets the default values.
+ ///
+ /// The request adapter to use to execute the requests.
+ public GeneratedAzureOpenAiClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary()) {
+ ApiClientBuilder.RegisterDefaultSerializer();
+ ApiClientBuilder.RegisterDefaultDeserializer();
+ if (string.IsNullOrEmpty(RequestAdapter.BaseUrl)) {
+ RequestAdapter.BaseUrl = "https://{endpoint}/openai";
+ }
+ PathParameters.TryAdd("baseurl", RequestAdapter.BaseUrl);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/AudioResponse.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/AudioResponse.cs
new file mode 100644
index 0000000..3d44379
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/AudioResponse.cs
@@ -0,0 +1,55 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Models {
+ ///
+ /// Translation or transcription response when response_format was json
+ ///
+ internal class AudioResponse : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// Translated or transcribed text.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? Text { get; set; }
+#nullable restore
+#else
+ public string Text { get; set; }
+#endif
+ ///
+ /// Instantiates a new audioResponse and sets the default values.
+ ///
+ public AudioResponse() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static AudioResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new AudioResponse();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"text", n => { Text = n.GetStringValue(); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteStringValue("text", Text);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/AudioVerboseResponse.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/AudioVerboseResponse.cs
new file mode 100644
index 0000000..0cbd857
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/AudioVerboseResponse.cs
@@ -0,0 +1,37 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Models {
+ ///
+ /// Translation or transcription response when response_format was verbose_json
+ ///
+ internal class AudioVerboseResponse : AudioResponse, IParsable {
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static new AudioVerboseResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new AudioVerboseResponse();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public override IDictionary> GetFieldDeserializers() {
+ return new Dictionary>(base.GetFieldDeserializers()) {
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public override void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ base.Serialize(writer);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionResponseObject.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionResponseObject.cs
new file mode 100644
index 0000000..f69a32f
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionResponseObject.cs
@@ -0,0 +1,12 @@
+//
+using System.Runtime.Serialization;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Models {
+ /// The object type.
+ internal enum ChatCompletionResponseObject {
+ /// The object type is chat completion.
+ [EnumMember(Value = "chat.completion")]
+ ChatCompletion,
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionsRequestCommon.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionsRequestCommon.cs
new file mode 100644
index 0000000..797613a
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionsRequestCommon.cs
@@ -0,0 +1,138 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Models {
+ internal class ChatCompletionsRequestCommon : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
+ public double? FrequencyPenalty { get; set; }
+ /// Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public ChatCompletionsRequestCommon_logit_bias? LogitBias { get; set; }
+#nullable restore
+#else
+ public ChatCompletionsRequestCommon_logit_bias LogitBias { get; set; }
+#endif
+ /// The maximum number of tokens allowed for the generated answer. By default, the number of tokens the model can return will be (4096 - prompt tokens).
+ public int? MaxTokens { get; set; }
+ /// Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
+ public double? PresencePenalty { get; set; }
+ /// Up to 4 sequences where the API will stop generating further tokens.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public ChatCompletionsRequestCommon_stop? Stop { get; set; }
+#nullable restore
+#else
+ public ChatCompletionsRequestCommon_stop Stop { get; set; }
+#endif
+ /// If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a `data: [DONE]` message.
+ public bool? Stream { get; set; }
+ /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.We generally recommend altering this or `top_p` but not both.
+ public double? Temperature { get; set; }
+ /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.We generally recommend altering this or `temperature` but not both.
+ public double? TopP { get; set; }
+ /// A unique identifier representing your end-user, which can help Azure OpenAI to monitor and detect abuse.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? User { get; set; }
+#nullable restore
+#else
+ public string User { get; set; }
+#endif
+ ///
+ /// Instantiates a new chatCompletionsRequestCommon and sets the default values.
+ ///
+ public ChatCompletionsRequestCommon() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static ChatCompletionsRequestCommon CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new ChatCompletionsRequestCommon();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"frequency_penalty", n => { FrequencyPenalty = n.GetDoubleValue(); } },
+ {"logit_bias", n => { LogitBias = n.GetObjectValue(ChatCompletionsRequestCommon_logit_bias.CreateFromDiscriminatorValue); } },
+ {"max_tokens", n => { MaxTokens = n.GetIntValue(); } },
+ {"presence_penalty", n => { PresencePenalty = n.GetDoubleValue(); } },
+ {"stop", n => { Stop = n.GetObjectValue(ChatCompletionsRequestCommon_stop.CreateFromDiscriminatorValue); } },
+ {"stream", n => { Stream = n.GetBoolValue(); } },
+ {"temperature", n => { Temperature = n.GetDoubleValue(); } },
+ {"top_p", n => { TopP = n.GetDoubleValue(); } },
+ {"user", n => { User = n.GetStringValue(); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteDoubleValue("frequency_penalty", FrequencyPenalty);
+ writer.WriteObjectValue("logit_bias", LogitBias);
+ writer.WriteIntValue("max_tokens", MaxTokens);
+ writer.WriteDoubleValue("presence_penalty", PresencePenalty);
+ writer.WriteObjectValue("stop", Stop);
+ writer.WriteBoolValue("stream", Stream);
+ writer.WriteDoubleValue("temperature", Temperature);
+ writer.WriteDoubleValue("top_p", TopP);
+ writer.WriteStringValue("user", User);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ ///
+ /// Composed type wrapper for classes string
+ ///
+ internal class ChatCompletionsRequestCommon_stop : IComposedTypeWrapper, IParsable {
+ /// Composed type representation for type string
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? String { get; set; }
+#nullable restore
+#else
+ public string String { get; set; }
+#endif
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static ChatCompletionsRequestCommon_stop CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ var mappingValue = parseNode.GetChildNode("")?.GetStringValue();
+ var result = new ChatCompletionsRequestCommon_stop();
+ if(parseNode.GetStringValue() is string stringValue) {
+ result.String = stringValue;
+ }
+ return result;
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary>();
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ if(String != null) {
+ writer.WriteStringValue(null, String);
+ }
+ }
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionsRequestCommon_logit_bias.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionsRequestCommon_logit_bias.cs
new file mode 100644
index 0000000..f9b6fe1
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionsRequestCommon_logit_bias.cs
@@ -0,0 +1,45 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Models {
+ ///
+ /// Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
+ ///
+ internal class ChatCompletionsRequestCommon_logit_bias : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ ///
+ /// Instantiates a new chatCompletionsRequestCommon_logit_bias and sets the default values.
+ ///
+ public ChatCompletionsRequestCommon_logit_bias() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static ChatCompletionsRequestCommon_logit_bias CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new ChatCompletionsRequestCommon_logit_bias();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionsResponseCommon.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionsResponseCommon.cs
new file mode 100644
index 0000000..894fc7f
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ChatCompletionsResponseCommon.cs
@@ -0,0 +1,90 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Models {
+ internal class ChatCompletionsResponseCommon : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// The Unix timestamp (in seconds) of when the chat completion was created.
+ public int? Created { get; set; }
+ /// A unique identifier for the chat completion.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? Id { get; set; }
+#nullable restore
+#else
+ public string Id { get; set; }
+#endif
+ /// The model used for the chat completion.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? Model { get; set; }
+#nullable restore
+#else
+ public string Model { get; set; }
+#endif
+ /// The object type.
+ public ChatCompletionResponseObject? Object { get; set; }
+ /// Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public string? SystemFingerprint { get; set; }
+#nullable restore
+#else
+ public string SystemFingerprint { get; set; }
+#endif
+ /// Usage statistics for the completion request.
+#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
+#nullable enable
+ public CompletionUsage? Usage { get; set; }
+#nullable restore
+#else
+ public CompletionUsage Usage { get; set; }
+#endif
+ ///
+ /// Instantiates a new chatCompletionsResponseCommon and sets the default values.
+ ///
+ public ChatCompletionsResponseCommon() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static ChatCompletionsResponseCommon CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new ChatCompletionsResponseCommon();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"created", n => { Created = n.GetIntValue(); } },
+ {"id", n => { Id = n.GetStringValue(); } },
+ {"model", n => { Model = n.GetStringValue(); } },
+ {"object", n => { Object = n.GetEnumValue(); } },
+ {"system_fingerprint", n => { SystemFingerprint = n.GetStringValue(); } },
+ {"usage", n => { Usage = n.GetObjectValue(CompletionUsage.CreateFromDiscriminatorValue); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteIntValue("created", Created);
+ writer.WriteStringValue("id", Id);
+ writer.WriteStringValue("model", Model);
+ writer.WriteEnumValue("object", Object);
+ writer.WriteStringValue("system_fingerprint", SystemFingerprint);
+ writer.WriteObjectValue("usage", Usage);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/CompletionUsage.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/CompletionUsage.cs
new file mode 100644
index 0000000..4faec91
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/CompletionUsage.cs
@@ -0,0 +1,57 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Models {
+ ///
+ /// Usage statistics for the completion request.
+ ///
+ internal class CompletionUsage : IAdditionalDataHolder, IParsable {
+ /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
+ public IDictionary AdditionalData { get; set; }
+ /// Number of tokens in the generated completion.
+ public int? CompletionTokens { get; set; }
+ /// Number of tokens in the prompt.
+ public int? PromptTokens { get; set; }
+ /// Total number of tokens used in the request (prompt + completion).
+ public int? TotalTokens { get; set; }
+ ///
+ /// Instantiates a new completionUsage and sets the default values.
+ ///
+ public CompletionUsage() {
+ AdditionalData = new Dictionary();
+ }
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static CompletionUsage CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new CompletionUsage();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public virtual IDictionary> GetFieldDeserializers() {
+ return new Dictionary> {
+ {"completion_tokens", n => { CompletionTokens = n.GetIntValue(); } },
+ {"prompt_tokens", n => { PromptTokens = n.GetIntValue(); } },
+ {"total_tokens", n => { TotalTokens = n.GetIntValue(); } },
+ };
+ }
+ ///
+ /// Serializes information the current object
+ ///
+ /// Serialization writer to use to serialize this model
+ public virtual void Serialize(ISerializationWriter writer) {
+ _ = writer ?? throw new ArgumentNullException(nameof(writer));
+ writer.WriteIntValue("completion_tokens", CompletionTokens);
+ writer.WriteIntValue("prompt_tokens", PromptTokens);
+ writer.WriteIntValue("total_tokens", TotalTokens);
+ writer.WriteAdditionalData(AdditionalData);
+ }
+ }
+}
+
diff --git a/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ContentFilterChoiceResults.cs b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ContentFilterChoiceResults.cs
new file mode 100644
index 0000000..f022515
--- /dev/null
+++ b/src/internal/OpenAI.GeneratedKiotaClient/generated/azure_openai/Models/ContentFilterChoiceResults.cs
@@ -0,0 +1,37 @@
+//
+using Microsoft.Kiota.Abstractions.Serialization;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System;
+namespace OpenAI.Azure.GeneratedKiotaClient.Models {
+ ///
+ /// Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not. Information about third party text and profanity, if it has been detected, and if it has been filtered or not. And information about customer block list, if it has been filtered and its id.
+ ///
+ internal class ContentFilterChoiceResults : ContentFilterResultsBase, IParsable {
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ ///
+ /// The parse node to use to read the discriminator value and create the object
+ public static new ContentFilterChoiceResults CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new ContentFilterChoiceResults();
+ }
+ ///
+ /// The deserialization information for the current model
+ ///
+ public override IDictionary> GetFieldDeserializers() {
+ return new Dictionary>(base.GetFieldDeserializers()) {
+ };
+ }
+ ///