From c017d1ef2a19508c6b7f22a4e16f36bdaf3b64e7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 15 Nov 2024 21:16:11 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...eepInfraApi.OpenaiAudioTranscriptions.g.cs | 298 ++++++++++++++++++ ....DeepInfraApi.OpenaiAudioTranslations.g.cs | 280 ++++++++++++++++ ...eepInfraApi.OpenaiAudioTranscriptions.g.cs | 53 ++++ ...IDeepInfraApi.OpenaiAudioTranslations.g.cs | 49 +++ ...sV1OpenaiAudioTranscriptionsPost.Json.g.cs | 92 ++++++ ...ptionsV1OpenaiAudioTranscriptionsPost.g.cs | 112 +++++++ ...AudioTranscriptionsPostResponseFormat.g.cs | 69 ++++ ...anscriptionsPostTimestampGranularitie.g.cs | 51 +++ ...onsV1OpenaiAudioTranslationsPost.Json.g.cs | 92 ++++++ ...slationsV1OpenaiAudioTranslationsPost.g.cs | 94 ++++++ ...aiAudioTranslationsPostResponseFormat.g.cs | 69 ++++ .../DeepInfra.Models.ModelDocBlockKey.g.cs | 18 ++ ...iAudioTranscriptionsPostResponse.Json.g.cs | 92 ++++++ ...OpenaiAudioTranscriptionsPostResponse.g.cs | 27 ++ ...naiAudioTranslationsPostResponse.Json.g.cs | 92 ++++++ ...V1OpenaiAudioTranslationsPostResponse.g.cs | 27 ++ .../DeepInfra.Models.SchemaVariantKey.g.cs | 6 + ...AudioTranscriptionsPostResponseFormat.g.cs | 49 +++ ...nscriptionsPostResponseFormatNullable.g.cs | 56 ++++ ...anscriptionsPostTimestampGranularitie.g.cs | 49 +++ ...ionsPostTimestampGranularitieNullable.g.cs | 56 ++++ ...aiAudioTranslationsPostResponseFormat.g.cs | 49 +++ ...ranslationsPostResponseFormatNullable.g.cs | 56 ++++ .../Generated/JsonSerializerContext.g.cs | 6 + .../Generated/JsonSerializerContextTypes.g.cs | 256 ++++++++------- src/libs/DeepInfra/openapi.yaml | 147 +++++++++ 26 files changed, 2129 insertions(+), 116 deletions(-) create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioTranscriptions.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioTranslations.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioTranscriptions.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioTranslations.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse.g.cs create mode 100644 src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.g.cs create mode 100644 src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatNullable.g.cs create mode 100644 src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.g.cs create mode 100644 src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieNullable.g.cs create mode 100644 src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.g.cs create mode 100644 src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatNullable.g.cs diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioTranscriptions.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioTranscriptions.g.cs new file mode 100644 index 0000000..f309936 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioTranscriptions.g.cs @@ -0,0 +1,298 @@ + +#nullable enable + +namespace DeepInfra +{ + public partial class DeepInfraApi + { + partial void PrepareOpenaiAudioTranscriptionsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xDeepinfraSource, + ref string? xiApiKey, + global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost request); + partial void PrepareOpenaiAudioTranscriptionsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xDeepinfraSource, + string? xiApiKey, + global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost request); + partial void ProcessOpenaiAudioTranscriptionsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessOpenaiAudioTranscriptionsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Openai Audio Transcriptions + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task OpenaiAudioTranscriptionsAsync( + global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost request, + string? xDeepinfraSource = default, + string? xiApiKey = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareOpenaiAudioTranscriptionsArguments( + httpClient: HttpClient, + xDeepinfraSource: ref xDeepinfraSource, + xiApiKey: ref xiApiKey, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/v1/openai/audio/transcriptions", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (xDeepinfraSource != default) + { + __httpRequest.Headers.TryAddWithoutValidation("x-deepinfra-source", xDeepinfraSource.ToString()); + } + if (xiApiKey != default) + { + __httpRequest.Headers.TryAddWithoutValidation("xi-api-key", xiApiKey.ToString()); + } + + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + if (xDeepinfraSource != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{xDeepinfraSource}"), + name: "x-deepinfra-source"); + } + if (xiApiKey != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{xiApiKey}"), + name: "xi-api-key"); + } + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()), + name: "file", + fileName: request.Filename ?? string.Empty); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Model}"), + name: "model"); + if (request.Language != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Language}"), + name: "language"); + } + if (request.Prompt != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Prompt}"), + name: "prompt"); + } + if (request.ResponseFormat != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), + name: "response_format"); + } + if (request.Temperature != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Temperature}"), + name: "temperature"); + } + if (request.TimestampGranularities != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.TimestampGranularities, x => x.ToValueString()))}]"), + name: "timestamp_granularities[]"); + } + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareOpenaiAudioTranscriptionsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + xDeepinfraSource: xDeepinfraSource, + xiApiKey: xiApiKey, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessOpenaiAudioTranscriptionsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessOpenaiAudioTranscriptionsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return __content; + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + return __content; + } + } + + /// + /// Openai Audio Transcriptions + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: json + /// + /// + /// Default Value: 0 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task OpenaiAudioTranscriptionsAsync( + byte[] file, + string filename, + string model, + string? xDeepinfraSource = default, + string? xiApiKey = default, + string? language = default, + string? prompt = default, + global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat? responseFormat = default, + double? temperature = default, + global::System.Collections.Generic.IList? timestampGranularities = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost + { + File = file, + Filename = filename, + Model = model, + Language = language, + Prompt = prompt, + ResponseFormat = responseFormat, + Temperature = temperature, + TimestampGranularities = timestampGranularities, + }; + + return await OpenaiAudioTranscriptionsAsync( + xDeepinfraSource: xDeepinfraSource, + xiApiKey: xiApiKey, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioTranslations.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioTranslations.g.cs new file mode 100644 index 0000000..d711227 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioTranslations.g.cs @@ -0,0 +1,280 @@ + +#nullable enable + +namespace DeepInfra +{ + public partial class DeepInfraApi + { + partial void PrepareOpenaiAudioTranslationsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? xDeepinfraSource, + ref string? xiApiKey, + global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost request); + partial void PrepareOpenaiAudioTranslationsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? xDeepinfraSource, + string? xiApiKey, + global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost request); + partial void ProcessOpenaiAudioTranslationsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessOpenaiAudioTranslationsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Openai Audio Translations + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task OpenaiAudioTranslationsAsync( + global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost request, + string? xDeepinfraSource = default, + string? xiApiKey = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareOpenaiAudioTranslationsArguments( + httpClient: HttpClient, + xDeepinfraSource: ref xDeepinfraSource, + xiApiKey: ref xiApiKey, + request: request); + + var __pathBuilder = new PathBuilder( + path: "/v1/openai/audio/translations", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (xDeepinfraSource != default) + { + __httpRequest.Headers.TryAddWithoutValidation("x-deepinfra-source", xDeepinfraSource.ToString()); + } + if (xiApiKey != default) + { + __httpRequest.Headers.TryAddWithoutValidation("xi-api-key", xiApiKey.ToString()); + } + + using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + if (xDeepinfraSource != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{xDeepinfraSource}"), + name: "x-deepinfra-source"); + } + if (xiApiKey != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{xiApiKey}"), + name: "xi-api-key"); + } + __httpRequestContent.Add( + content: new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()), + name: "file", + fileName: request.Filename ?? string.Empty); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Model}"), + name: "model"); + if (request.Prompt != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Prompt}"), + name: "prompt"); + } + if (request.ResponseFormat != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"), + name: "response_format"); + } + if (request.Temperature != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.Temperature}"), + name: "temperature"); + } + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareOpenaiAudioTranslationsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + xDeepinfraSource: xDeepinfraSource, + xiApiKey: xiApiKey, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessOpenaiAudioTranslationsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessOpenaiAudioTranslationsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return __content; + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + return __content; + } + } + + /// + /// Openai Audio Translations + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: json + /// + /// + /// Default Value: 0 + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task OpenaiAudioTranslationsAsync( + byte[] file, + string filename, + string model, + string? xDeepinfraSource = default, + string? xiApiKey = default, + string? prompt = default, + global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat? responseFormat = default, + double? temperature = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost + { + File = file, + Filename = filename, + Model = model, + Prompt = prompt, + ResponseFormat = responseFormat, + Temperature = temperature, + }; + + return await OpenaiAudioTranslationsAsync( + xDeepinfraSource: xDeepinfraSource, + xiApiKey: xiApiKey, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioTranscriptions.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioTranscriptions.g.cs new file mode 100644 index 0000000..7319318 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioTranscriptions.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace DeepInfra +{ + public partial interface IDeepInfraApi + { + /// + /// Openai Audio Transcriptions + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task OpenaiAudioTranscriptionsAsync( + global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost request, + string? xDeepinfraSource = default, + string? xiApiKey = default, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Openai Audio Transcriptions + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: json + /// + /// + /// Default Value: 0 + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task OpenaiAudioTranscriptionsAsync( + byte[] file, + string filename, + string model, + string? xDeepinfraSource = default, + string? xiApiKey = default, + string? language = default, + string? prompt = default, + global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat? responseFormat = default, + double? temperature = default, + global::System.Collections.Generic.IList? timestampGranularities = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioTranslations.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioTranslations.g.cs new file mode 100644 index 0000000..a17198d --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioTranslations.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace DeepInfra +{ + public partial interface IDeepInfraApi + { + /// + /// Openai Audio Translations + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task OpenaiAudioTranslationsAsync( + global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost request, + string? xDeepinfraSource = default, + string? xiApiKey = default, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Openai Audio Translations + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: json + /// + /// + /// Default Value: 0 + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task OpenaiAudioTranslationsAsync( + byte[] file, + string filename, + string model, + string? xDeepinfraSource = default, + string? xiApiKey = default, + string? prompt = default, + global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat? responseFormat = default, + double? temperature = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost.Json.g.cs new file mode 100644 index 0000000..1850830 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost), + jsonSerializerContext) as global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost.g.cs new file mode 100644 index 0000000..a93ecc1 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost.g.cs @@ -0,0 +1,112 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] File { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Filename { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Model { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("language")] + public string? Language { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public string? Prompt { get; set; } + + /// + /// Default Value: json + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::DeepInfra.JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatJsonConverter))] + public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat? ResponseFormat { get; set; } + + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("timestamp_granularities[]")] + public global::System.Collections.Generic.IList? TimestampGranularities { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// + /// Default Value: json + /// + /// + /// Default Value: 0 + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost( + byte[] file, + string filename, + string model, + string? language, + string? prompt, + global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat? responseFormat, + double? temperature, + global::System.Collections.Generic.IList? timestampGranularities) + { + this.File = file ?? throw new global::System.ArgumentNullException(nameof(file)); + this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Language = language; + this.Prompt = prompt; + this.ResponseFormat = responseFormat; + this.Temperature = temperature; + this.TimestampGranularities = timestampGranularities; + } + + /// + /// Initializes a new instance of the class. + /// + public BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost() + { + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.g.cs new file mode 100644 index 0000000..bd5a55e --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// Default Value: json + /// + public enum BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat + { + /// + /// + /// + Json, + /// + /// + /// + VerboseJson, + /// + /// + /// + Text, + /// + /// + /// + Srt, + /// + /// + /// + Vtt, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat value) + { + return value switch + { + BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.Json => "json", + BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.VerboseJson => "verbose_json", + BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.Text => "text", + BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.Srt => "srt", + BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.Vtt => "vtt", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat? ToEnum(string value) + { + return value switch + { + "json" => BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.Json, + "verbose_json" => BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.VerboseJson, + "text" => BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.Text, + "srt" => BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.Srt, + "vtt" => BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.Vtt, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.g.cs new file mode 100644 index 0000000..a76f9ab --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public enum BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie + { + /// + /// + /// + Segment, + /// + /// + /// + Word, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie value) + { + return value switch + { + BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.Segment => "segment", + BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.Word => "word", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie? ToEnum(string value) + { + return value switch + { + "segment" => BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.Segment, + "word" => BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.Word, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost.Json.g.cs new file mode 100644 index 0000000..82d90dc --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost), + jsonSerializerContext) as global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost.g.cs new file mode 100644 index 0000000..66ac16f --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost.g.cs @@ -0,0 +1,94 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file")] + [global::System.Text.Json.Serialization.JsonRequired] + public required byte[] File { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("filename")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Filename { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Model { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] + public string? Prompt { get; set; } + + /// + /// Default Value: json + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_format")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::DeepInfra.JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatJsonConverter))] + public global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat? ResponseFormat { get; set; } + + /// + /// Default Value: 0 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// Default Value: json + /// + /// + /// Default Value: 0 + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost( + byte[] file, + string filename, + string model, + string? prompt, + global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat? responseFormat, + double? temperature) + { + this.File = file ?? throw new global::System.ArgumentNullException(nameof(file)); + this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Prompt = prompt; + this.ResponseFormat = responseFormat; + this.Temperature = temperature; + } + + /// + /// Initializes a new instance of the class. + /// + public BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost() + { + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.g.cs new file mode 100644 index 0000000..fba0b62 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// Default Value: json + /// + public enum BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat + { + /// + /// + /// + Json, + /// + /// + /// + VerboseJson, + /// + /// + /// + Text, + /// + /// + /// + Srt, + /// + /// + /// + Vtt, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat value) + { + return value switch + { + BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.Json => "json", + BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.VerboseJson => "verbose_json", + BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.Text => "text", + BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.Srt => "srt", + BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.Vtt => "vtt", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat? ToEnum(string value) + { + return value switch + { + "json" => BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.Json, + "verbose_json" => BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.VerboseJson, + "text" => BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.Text, + "srt" => BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.Srt, + "vtt" => BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.Vtt, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDocBlockKey.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDocBlockKey.g.cs index f131f3c..9ea17e5 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDocBlockKey.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDocBlockKey.g.cs @@ -47,6 +47,18 @@ public enum ModelDocBlockKey /// /// /// + OpenaiSpeechHttp, + /// + /// + /// + OpenaiSpeechPython, + /// + /// + /// + OpenaiSpeechJs, + /// + /// + /// OpenaiCompPython, /// /// @@ -151,6 +163,9 @@ public static string ToValueString(this ModelDocBlockKey value) ModelDocBlockKey.OpenaiPython => "openai-python", ModelDocBlockKey.OpenaiHttp => "openai-http", ModelDocBlockKey.OpenaiJs => "openai-js", + ModelDocBlockKey.OpenaiSpeechHttp => "openai-speech-http", + ModelDocBlockKey.OpenaiSpeechPython => "openai-speech-python", + ModelDocBlockKey.OpenaiSpeechJs => "openai-speech-js", ModelDocBlockKey.OpenaiCompPython => "openai-comp-python", ModelDocBlockKey.OpenaiCompHttp => "openai-comp-http", ModelDocBlockKey.OpenaiCompJs => "openai-comp-js", @@ -191,6 +206,9 @@ public static string ToValueString(this ModelDocBlockKey value) "openai-python" => ModelDocBlockKey.OpenaiPython, "openai-http" => ModelDocBlockKey.OpenaiHttp, "openai-js" => ModelDocBlockKey.OpenaiJs, + "openai-speech-http" => ModelDocBlockKey.OpenaiSpeechHttp, + "openai-speech-python" => ModelDocBlockKey.OpenaiSpeechPython, + "openai-speech-js" => ModelDocBlockKey.OpenaiSpeechJs, "openai-comp-python" => ModelDocBlockKey.OpenaiCompPython, "openai-comp-http" => ModelDocBlockKey.OpenaiCompHttp, "openai-comp-js" => ModelDocBlockKey.OpenaiCompJs, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse.Json.g.cs new file mode 100644 index 0000000..16d9134 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::DeepInfra.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse), + jsonSerializerContext) as global::DeepInfra.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::DeepInfra.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::DeepInfra.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse.g.cs new file mode 100644 index 0000000..546feae --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse.g.cs @@ -0,0 +1,27 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse( + ) + { + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse.Json.g.cs new file mode 100644 index 0000000..cb3f1b3 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::DeepInfra.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse), + jsonSerializerContext) as global::DeepInfra.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::DeepInfra.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::DeepInfra.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse.g.cs new file mode 100644 index 0000000..f947072 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse.g.cs @@ -0,0 +1,27 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse( + ) + { + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaVariantKey.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaVariantKey.g.cs index 8dc57bc..a6712ea 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaVariantKey.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaVariantKey.g.cs @@ -27,6 +27,10 @@ public enum SchemaVariantKey /// /// /// + OpenaiSpeechToText, + /// + /// + /// CreateVoice, /// /// @@ -62,6 +66,7 @@ public static string ToValueString(this SchemaVariantKey value) SchemaVariantKey.OpenaiCompletions => "openai-completions", SchemaVariantKey.OpenaiChatCompletions => "openai-chat-completions", SchemaVariantKey.OpenaiEmbeddings => "openai-embeddings", + SchemaVariantKey.OpenaiSpeechToText => "openai-speech-to-text", SchemaVariantKey.CreateVoice => "create-voice", SchemaVariantKey.ReadVoice => "read-voice", SchemaVariantKey.UpdateVoice => "update-voice", @@ -81,6 +86,7 @@ public static string ToValueString(this SchemaVariantKey value) "openai-completions" => SchemaVariantKey.OpenaiCompletions, "openai-chat-completions" => SchemaVariantKey.OpenaiChatCompletions, "openai-embeddings" => SchemaVariantKey.OpenaiEmbeddings, + "openai-speech-to-text" => SchemaVariantKey.OpenaiSpeechToText, "create-voice" => SchemaVariantKey.CreateVoice, "read-voice" => SchemaVariantKey.ReadVoice, "update-voice" => SchemaVariantKey.UpdateVoice, diff --git a/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.g.cs new file mode 100644 index 0000000..aa98d4c --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace DeepInfra.JsonConverters +{ + /// + public sealed class BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatNullable.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatNullable.g.cs new file mode 100644 index 0000000..11d2ee1 --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace DeepInfra.JsonConverters +{ + /// + public sealed class BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.g.cs new file mode 100644 index 0000000..e7b729b --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace DeepInfra.JsonConverters +{ + /// + public sealed class BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieNullable.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieNullable.g.cs new file mode 100644 index 0000000..8329394 --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace DeepInfra.JsonConverters +{ + /// + public sealed class BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.g.cs new file mode 100644 index 0000000..786bae0 --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace DeepInfra.JsonConverters +{ + /// + public sealed class BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatNullable.g.cs b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatNullable.g.cs new file mode 100644 index 0000000..5785eaa --- /dev/null +++ b/src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace DeepInfra.JsonConverters +{ + /// + public sealed class BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/DeepInfra/Generated/JsonSerializerContext.g.cs b/src/libs/DeepInfra/Generated/JsonSerializerContext.g.cs index c732790..0823d72 100644 --- a/src/libs/DeepInfra/Generated/JsonSerializerContext.g.cs +++ b/src/libs/DeepInfra/Generated/JsonSerializerContext.g.cs @@ -15,6 +15,12 @@ namespace DeepInfra { typeof(global::DeepInfra.JsonConverters.SuspendReasonJsonConverter), typeof(global::DeepInfra.JsonConverters.SuspendReasonNullableJsonConverter), + typeof(global::DeepInfra.JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatJsonConverter), + typeof(global::DeepInfra.JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatNullableJsonConverter), + typeof(global::DeepInfra.JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieJsonConverter), + typeof(global::DeepInfra.JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieNullableJsonConverter), + typeof(global::DeepInfra.JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatJsonConverter), + typeof(global::DeepInfra.JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatNullableJsonConverter), typeof(global::DeepInfra.JsonConverters.ChatCompletionAssistantMessageRoleJsonConverter), typeof(global::DeepInfra.JsonConverters.ChatCompletionAssistantMessageRoleNullableJsonConverter), typeof(global::DeepInfra.JsonConverters.ChatCompletionContentPartImageTypeJsonConverter), diff --git a/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs b/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs index 52278a5..fc4c62f 100644 --- a/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs @@ -138,466 +138,490 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost? Type30 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost? Type30 { get; set; } /// /// /// - public global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost? Type31 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat? Type31 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionAssistantMessage? Type32 { get; set; } + public global::System.Collections.Generic.IList? Type32 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionAssistantMessageRole? Type33 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie? Type33 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type34 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost? Type34 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionMessageToolCall? Type35 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat? Type35 { get; set; } /// /// /// - public global::DeepInfra.Function? Type36 { get; set; } + public global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost? Type36 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionContentPartImage? Type37 { get; set; } + public global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost? Type37 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionContentPartImageType? Type38 { get; set; } + public global::DeepInfra.ChatCompletionAssistantMessage? Type38 { get; set; } /// /// /// - public global::DeepInfra.ImageURL? Type39 { get; set; } + public global::DeepInfra.ChatCompletionAssistantMessageRole? Type39 { get; set; } /// /// /// - public global::DeepInfra.ImageURLDetail? Type40 { get; set; } + public global::System.Collections.Generic.IList? Type40 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionContentPartText? Type41 { get; set; } + public global::DeepInfra.ChatCompletionMessageToolCall? Type41 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionContentPartTextType? Type42 { get; set; } + public global::DeepInfra.Function? Type42 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionSystemMessage? Type43 { get; set; } + public global::DeepInfra.ChatCompletionContentPartImage? Type43 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionSystemMessageRole? Type44 { get; set; } + public global::DeepInfra.ChatCompletionContentPartImageType? Type44 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionToolMessage? Type45 { get; set; } + public global::DeepInfra.ImageURL? Type45 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionToolMessageRole? Type46 { get; set; } + public global::DeepInfra.ImageURLDetail? Type46 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionUserMessage? Type47 { get; set; } + public global::DeepInfra.ChatCompletionContentPartText? Type47 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionUserMessageRole? Type48 { get; set; } + public global::DeepInfra.ChatCompletionContentPartTextType? Type48 { get; set; } /// /// /// - public global::DeepInfra.AnyOf>>? Type49 { get; set; } + public global::DeepInfra.ChatCompletionSystemMessage? Type49 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type50 { get; set; } + public global::DeepInfra.ChatCompletionSystemMessageRole? Type50 { get; set; } /// /// /// - public global::DeepInfra.AnyOf? Type51 { get; set; } + public global::DeepInfra.ChatCompletionToolMessage? Type51 { get; set; } /// /// /// - public global::DeepInfra.ChatTools? Type52 { get; set; } + public global::DeepInfra.ChatCompletionToolMessageRole? Type52 { get; set; } /// /// /// - public global::DeepInfra.FunctionDefinition? Type53 { get; set; } + public global::DeepInfra.ChatCompletionUserMessage? Type53 { get; set; } /// /// /// - public object? Type54 { get; set; } + public global::DeepInfra.ChatCompletionUserMessageRole? Type54 { get; set; } /// /// /// - public global::DeepInfra.DeepError? Type55 { get; set; } + public global::DeepInfra.AnyOf>>? Type55 { get; set; } /// /// /// - public global::DeepInfra.DeployDelete? Type56 { get; set; } + public global::System.Collections.Generic.IList>? Type56 { get; set; } /// /// /// - public global::DeepInfra.DeployGPUAvailability? Type57 { get; set; } + public global::DeepInfra.AnyOf? Type57 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type58 { get; set; } + public global::DeepInfra.ChatTools? Type58 { get; set; } /// /// /// - public global::DeepInfra.GPUAvailabilityInfo? Type59 { get; set; } + public global::DeepInfra.FunctionDefinition? Type59 { get; set; } /// /// /// - public global::DeepInfra.DeployGPUs? Type60 { get; set; } + public object? Type60 { get; set; } /// /// /// - public global::DeepInfra.DeployInstances? Type61 { get; set; } + public global::DeepInfra.DeepError? Type61 { get; set; } /// /// /// - public global::DeepInfra.DeployLLMConfig? Type62 { get; set; } + public global::DeepInfra.DeployDelete? Type62 { get; set; } /// /// /// - public global::DeepInfra.HFWeights? Type63 { get; set; } + public global::DeepInfra.DeployGPUAvailability? Type63 { get; set; } /// /// /// - public global::DeepInfra.DeployLLMIn? Type64 { get; set; } + public global::System.Collections.Generic.IList? Type64 { get; set; } /// /// /// - public global::DeepInfra.ScaleSettings? Type65 { get; set; } + public global::DeepInfra.GPUAvailabilityInfo? Type65 { get; set; } /// /// /// - public global::DeepInfra.DeployLLMUpdateIn? Type66 { get; set; } + public global::DeepInfra.DeployGPUs? Type66 { get; set; } /// /// /// - public global::DeepInfra.DeployModelIn? Type67 { get; set; } + public global::DeepInfra.DeployInstances? Type67 { get; set; } /// /// /// - public global::DeepInfra.ModelProvider? Type68 { get; set; } + public global::DeepInfra.DeployLLMConfig? Type68 { get; set; } /// /// /// - public global::DeepInfra.DeployResult? Type69 { get; set; } + public global::DeepInfra.HFWeights? Type69 { get; set; } /// /// /// - public global::DeepInfra.DeployStatusOut? Type70 { get; set; } + public global::DeepInfra.DeployLLMIn? Type70 { get; set; } /// /// /// - public global::DeepInfra.DeployType? Type71 { get; set; } + public global::DeepInfra.ScaleSettings? Type71 { get; set; } /// /// /// - public global::DeepInfra.DeploymentLogEntry? Type72 { get; set; } + public global::DeepInfra.DeployLLMUpdateIn? Type72 { get; set; } /// /// /// - public global::DeepInfra.DeploymentLogQueryOut? Type73 { get; set; } + public global::DeepInfra.DeployModelIn? Type73 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary>>? Type74 { get; set; } + public global::DeepInfra.ModelProvider? Type74 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type75 { get; set; } + public global::DeepInfra.DeployResult? Type75 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type76 { get; set; } + public global::DeepInfra.DeployStatusOut? Type76 { get; set; } /// /// /// - public global::DeepInfra.DeploymentOut? Type77 { get; set; } + public global::DeepInfra.DeployType? Type77 { get; set; } /// /// /// - public global::System.DateTime? Type78 { get; set; } + public global::DeepInfra.DeploymentLogEntry? Type78 { get; set; } /// /// /// - public global::DeepInfra.DeploymentStatsOut? Type79 { get; set; } + public global::DeepInfra.DeploymentLogQueryOut? Type79 { get; set; } /// /// /// - public global::DeepInfra.DetailedDeploymentStatsOut? Type80 { get; set; } + public global::System.Collections.Generic.Dictionary>>? Type80 { get; set; } /// /// /// - public global::DeepInfra.LLMDeploymentStatsOut? Type81 { get; set; } + public global::System.Collections.Generic.IList>? Type81 { get; set; } /// /// /// - public global::DeepInfra.EmbeddingsDeploymentStatsOut? Type82 { get; set; } + public global::System.Collections.Generic.IList? Type82 { get; set; } /// /// /// - public global::DeepInfra.TimeDeploymentStatsOut? Type83 { get; set; } + public global::DeepInfra.DeploymentOut? Type83 { get; set; } /// /// /// - public global::DeepInfra.ElevenLabsTextToSpeechIn? Type84 { get; set; } + public global::System.DateTime? Type84 { get; set; } /// /// /// - public global::DeepInfra.TtsResponseFormat? Type85 { get; set; } + public global::DeepInfra.DeploymentStatsOut? Type85 { get; set; } /// /// /// - public global::DeepInfra.EmailsOut? Type86 { get; set; } + public global::DeepInfra.DetailedDeploymentStatsOut? Type86 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type87 { get; set; } + public global::DeepInfra.LLMDeploymentStatsOut? Type87 { get; set; } /// /// /// - public global::DeepInfra.FeedbackIn? Type88 { get; set; } + public global::DeepInfra.EmbeddingsDeploymentStatsOut? Type88 { get; set; } /// /// /// - public global::DeepInfra.GetVoicesOut? Type89 { get; set; } + public global::DeepInfra.TimeDeploymentStatsOut? Type89 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type90 { get; set; } + public global::DeepInfra.ElevenLabsTextToSpeechIn? Type90 { get; set; } /// /// /// - public global::DeepInfra.Voice? Type91 { get; set; } + public global::DeepInfra.TtsResponseFormat? Type91 { get; set; } /// /// /// - public global::DeepInfra.HFModel? Type92 { get; set; } + public global::DeepInfra.EmailsOut? Type92 { get; set; } /// /// /// - public global::DeepInfra.HFTasksE? Type93 { get; set; } + public global::System.Collections.Generic.IList? Type93 { get; set; } /// /// /// - public global::DeepInfra.LogEntry? Type94 { get; set; } + public global::DeepInfra.FeedbackIn? Type94 { get; set; } /// /// /// - public global::DeepInfra.LogQueryOut? Type95 { get; set; } + public global::DeepInfra.GetVoicesOut? Type95 { get; set; } /// /// /// - public global::DeepInfra.Me? Type96 { get; set; } + public global::System.Collections.Generic.IList? Type96 { get; set; } /// /// /// - public global::DeepInfra.MeIn? Type97 { get; set; } + public global::DeepInfra.Voice? Type97 { get; set; } /// /// /// - public global::DeepInfra.MeUsername? Type98 { get; set; } + public global::DeepInfra.HFModel? Type98 { get; set; } /// /// /// - public global::DeepInfra.ModelDocBlock? Type99 { get; set; } + public global::DeepInfra.HFTasksE? Type99 { get; set; } /// /// /// - public global::DeepInfra.ModelDocBlockKey? Type100 { get; set; } + public global::DeepInfra.LogEntry? Type100 { get; set; } /// /// /// - public global::DeepInfra.ModelFieldInfo? Type101 { get; set; } + public global::DeepInfra.LogQueryOut? Type101 { get; set; } /// /// /// - public global::DeepInfra.ModelInfoOut? Type102 { get; set; } + public global::DeepInfra.Me? Type102 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type103 { get; set; } + public global::DeepInfra.MeIn? Type103 { get; set; } /// /// /// - public global::DeepInfra.AnyOf? Type104 { get; set; } + public global::DeepInfra.MeUsername? Type104 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingTime? Type105 { get; set; } + public global::DeepInfra.ModelDocBlock? Type105 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingUptime? Type106 { get; set; } + public global::DeepInfra.ModelDocBlockKey? Type106 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingTokens? Type107 { get; set; } + public global::DeepInfra.ModelFieldInfo? Type107 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingInputLength? Type108 { get; set; } + public global::DeepInfra.ModelInfoOut? Type108 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingInputTokens? Type109 { get; set; } + public global::System.Collections.Generic.IList? Type109 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingInputCharacterLength? Type110 { get; set; } + public global::DeepInfra.AnyOf? Type110 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingImageUnits? Type111 { get; set; } + public global::DeepInfra.ModelPricingTime? Type111 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type112 { get; set; } + public global::DeepInfra.ModelPricingUptime? Type112 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type113 { get; set; } + public global::DeepInfra.ModelPricingTokens? Type113 { get; set; } /// /// /// - public global::DeepInfra.SchemaVariant? Type114 { get; set; } + public global::DeepInfra.ModelPricingInputLength? Type114 { get; set; } /// /// /// - public global::DeepInfra.SchemaVariantKey? Type115 { get; set; } + public global::DeepInfra.ModelPricingInputTokens? Type115 { get; set; } /// /// /// - public global::DeepInfra.ModelMetaIn? Type116 { get; set; } + public global::DeepInfra.ModelPricingInputCharacterLength? Type116 { get; set; } /// /// /// - public global::DeepInfra.ModelOut? Type117 { get; set; } + public global::DeepInfra.ModelPricingImageUnits? Type117 { get; set; } /// /// /// - public global::DeepInfra.AnyOf? Type118 { get; set; } + public global::System.Collections.Generic.IList? Type118 { get; set; } /// /// /// - public global::DeepInfra.ModelPublicityIn? Type119 { get; set; } + public global::System.Collections.Generic.IList? Type119 { get; set; } /// /// /// - public global::DeepInfra.ModelVersionOut? Type120 { get; set; } + public global::DeepInfra.SchemaVariant? Type120 { get; set; } /// /// /// - public global::DeepInfra.OpenAIChatCompletionsIn? Type121 { get; set; } + public global::DeepInfra.SchemaVariantKey? Type121 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type122 { get; set; } + public global::DeepInfra.ModelMetaIn? Type122 { get; set; } /// /// /// - public global::DeepInfra.AnyOf? Type123 { get; set; } + public global::DeepInfra.ModelOut? Type123 { get; set; } /// /// /// - public global::DeepInfra.AnyOf>? Type124 { get; set; } + public global::DeepInfra.AnyOf? Type124 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type125 { get; set; } + public global::DeepInfra.ModelPublicityIn? Type125 { get; set; } /// /// /// - public global::DeepInfra.ResponseFormat? Type126 { get; set; } + public global::DeepInfra.ModelVersionOut? Type126 { get; set; } /// /// /// - public global::DeepInfra.ResponseFormatType? Type127 { get; set; } + public global::DeepInfra.OpenAIChatCompletionsIn? Type127 { get; set; } /// /// /// - public global::DeepInfra.OpenAICompletionsIn? Type128 { get; set; } + public global::System.Collections.Generic.IList>? Type128 { get; set; } /// /// /// - public global::DeepInfra.OpenAIEmbeddingsIn? Type129 { get; set; } + public global::DeepInfra.AnyOf? Type129 { get; set; } /// /// /// - public global::DeepInfra.AnyOf, string>? Type130 { get; set; } + public global::DeepInfra.AnyOf>? Type130 { get; set; } /// /// /// - public global::DeepInfra.OpenAIEmbeddingsInEncodingFormat? Type131 { get; set; } + public global::System.Collections.Generic.IList? Type131 { get; set; } /// /// /// - public global::DeepInfra.OpenAIModelOut? Type132 { get; set; } + public global::DeepInfra.ResponseFormat? Type132 { get; set; } /// /// /// - public global::DeepInfra.OpenAIModelsOut? Type133 { get; set; } + public global::DeepInfra.ResponseFormatType? Type133 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type134 { get; set; } + public global::DeepInfra.OpenAICompletionsIn? Type134 { get; set; } /// /// /// - public global::DeepInfra.OpenAITextToSpeechIn? Type135 { get; set; } + public global::DeepInfra.OpenAIEmbeddingsIn? Type135 { get; set; } /// /// /// - public global::DeepInfra.TtsVoice? Type136 { get; set; } + public global::DeepInfra.AnyOf, string>? Type136 { get; set; } /// /// /// - public global::DeepInfra.RateLimitOut? Type137 { get; set; } + public global::DeepInfra.OpenAIEmbeddingsInEncodingFormat? Type137 { get; set; } /// /// /// - public global::DeepInfra.RateLimitRequestIn? Type138 { get; set; } + public global::DeepInfra.OpenAIModelOut? Type138 { get; set; } /// /// /// - public global::DeepInfra.SchemaFieldOut? Type139 { get; set; } + public global::DeepInfra.OpenAIModelsOut? Type139 { get; set; } /// /// /// - public global::DeepInfra.SchemaOut? Type140 { get; set; } + public global::System.Collections.Generic.IList? Type140 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type141 { get; set; } + public global::DeepInfra.OpenAITextToSpeechIn? Type141 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type142 { get; set; } + public global::DeepInfra.TtsVoice? Type142 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type143 { get; set; } + public global::DeepInfra.RateLimitOut? Type143 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type144 { get; set; } + public global::DeepInfra.RateLimitRequestIn? Type144 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type145 { get; set; } + public global::DeepInfra.SchemaFieldOut? Type145 { get; set; } + /// + /// + /// + public global::DeepInfra.SchemaOut? Type146 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type147 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type148 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type149 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type150 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type151 { get; set; } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/openapi.yaml b/src/libs/DeepInfra/openapi.yaml index 75c0a8c..defab70 100644 --- a/src/libs/DeepInfra/openapi.yaml +++ b/src/libs/DeepInfra/openapi.yaml @@ -1464,6 +1464,76 @@ paths: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [ ] + /v1/openai/audio/transcriptions: + post: + summary: Openai Audio Transcriptions + operationId: openai_audio_transcriptions_v1_openai_audio_transcriptions_post + parameters: + - name: x-deepinfra-source + in: header + schema: + title: X-Deepinfra-Source + type: string + - name: xi-api-key + in: header + schema: + title: Xi-Api-Key + type: string + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_openai_audio_transcriptions_v1_openai_audio_transcriptions_post' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + security: + - HTTPBearer: [ ] + /v1/openai/audio/translations: + post: + summary: Openai Audio Translations + operationId: openai_audio_translations_v1_openai_audio_translations_post + parameters: + - name: x-deepinfra-source + in: header + schema: + title: X-Deepinfra-Source + type: string + - name: xi-api-key + in: header + schema: + title: Xi-Api-Key + type: string + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_openai_audio_translations_v1_openai_audio_translations_post' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + security: + - HTTPBearer: [ ] /v1/logs/query: get: summary: Logs Query @@ -2620,6 +2690,79 @@ components: items: type: string format: binary + Body_openai_audio_transcriptions_v1_openai_audio_transcriptions_post: + title: Body_openai_audio_transcriptions_v1_openai_audio_transcriptions_post + required: + - file + - model + type: object + properties: + file: + title: File + type: string + format: binary + model: + title: Model + type: string + language: + title: Language + type: string + prompt: + title: Prompt + type: string + response_format: + title: Response Format + enum: + - json + - verbose_json + - text + - srt + - vtt + type: string + default: json + temperature: + title: Temperature + type: number + default: 0 + 'timestamp_granularities[]': + title: 'Timestamp Granularities[]' + type: array + items: + enum: + - segment + - word + type: string + Body_openai_audio_translations_v1_openai_audio_translations_post: + title: Body_openai_audio_translations_v1_openai_audio_translations_post + required: + - file + - model + type: object + properties: + file: + title: File + type: string + format: binary + model: + title: Model + type: string + prompt: + title: Prompt + type: string + response_format: + title: Response Format + enum: + - json + - verbose_json + - text + - srt + - vtt + type: string + default: json + temperature: + title: Temperature + type: number + default: 0 Body_openai_files_v1_openai_files_post: title: Body_openai_files_v1_openai_files_post required: @@ -3575,6 +3718,9 @@ components: - openai-python - openai-http - openai-js + - openai-speech-http + - openai-speech-python + - openai-speech-js - openai-comp-python - openai-comp-http - openai-comp-js @@ -4496,6 +4642,7 @@ components: - openai-completions - openai-chat-completions - openai-embeddings + - openai-speech-to-text - create-voice - read-voice - update-voice