From 4375fe4d1eeed73dd7cb07589b159897f54e404d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 24 Sep 2025 18:25:22 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../DeepInfra..JsonSerializerContext.g.cs | 4 + ...fra.DeepInfraClient.AnthropicMessages.g.cs | 341 ++++++++++++++ ...raClient.AnthropicMessagesCountTokens.g.cs | 264 +++++++++++ ...ra.IDeepInfraClient.AnthropicMessages.g.cs | 79 ++++ ...raClient.AnthropicMessagesCountTokens.g.cs | 45 ++ ...Converters.AnthropicSystemContentType.g.cs | 53 +++ ...rs.AnthropicSystemContentTypeNullable.g.cs | 60 +++ .../DeepInfra.JsonSerializerContextTypes.g.cs | 426 ++++++++++-------- ...sAnthropicV1MessagesPostResponse.Json.g.cs | 92 ++++ ...ssagesAnthropicV1MessagesPostResponse.g.cs | 18 + ...1MessagesCountTokensPostResponse.Json.g.cs | 92 ++++ ...opicV1MessagesCountTokensPostResponse.g.cs | 18 + ...Infra.Models.AnthropicMessagesIn.Json.g.cs | 92 ++++ .../DeepInfra.Models.AnthropicMessagesIn.g.cs | 160 +++++++ ...odels.AnthropicMessagesInMessage.Json.g.cs | 92 ++++ ...fra.Models.AnthropicMessagesInMessage.g.cs | 18 + ...dels.AnthropicMessagesInMetadata.Json.g.cs | 92 ++++ ...ra.Models.AnthropicMessagesInMetadata.g.cs | 18 + ...ls.AnthropicMessagesInToolChoice.Json.g.cs | 92 ++++ ....Models.AnthropicMessagesInToolChoice.g.cs | 18 + ...ra.Models.AnthropicSystemContent.Json.g.cs | 92 ++++ ...epInfra.Models.AnthropicSystemContent.g.cs | 54 +++ ...fra.Models.AnthropicSystemContentType.g.cs | 45 ++ ...a.Models.AnthropicThinkingConfig.Json.g.cs | 92 ++++ ...pInfra.Models.AnthropicThinkingConfig.g.cs | 45 ++ ...odels.AnthropicTokenCountRequest.Json.g.cs | 92 ++++ ...fra.Models.AnthropicTokenCountRequest.g.cs | 93 ++++ ...nthropicTokenCountRequestMessage.Json.g.cs | 92 ++++ ...els.AnthropicTokenCountRequestMessage.g.cs | 18 + ...ropicTokenCountRequestToolChoice.Json.g.cs | 92 ++++ ....AnthropicTokenCountRequestToolChoice.g.cs | 18 + .../DeepInfra.Models.AnthropicTool.Json.g.cs | 92 ++++ .../DeepInfra.Models.AnthropicTool.g.cs | 63 +++ ....Models.AnthropicToolInputSchema.Json.g.cs | 92 ++++ ...Infra.Models.AnthropicToolInputSchema.g.cs | 18 + src/libs/DeepInfra/openapi.yaml | 236 ++++++++++ 36 files changed, 3113 insertions(+), 195 deletions(-) create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.AnthropicMessages.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.AnthropicMessagesCountTokens.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.AnthropicMessages.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.AnthropicMessagesCountTokens.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.JsonConverters.AnthropicSystemContentType.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.JsonConverters.AnthropicSystemContentTypeNullable.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesAnthropicV1MessagesPostResponse.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesAnthropicV1MessagesPostResponse.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesIn.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesIn.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMessage.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMessage.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMetadata.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMetadata.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInToolChoice.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInToolChoice.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicSystemContent.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicSystemContent.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicSystemContentType.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicThinkingConfig.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicThinkingConfig.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequest.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequest.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestMessage.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestMessage.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestToolChoice.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestToolChoice.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTool.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTool.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicToolInputSchema.Json.g.cs create mode 100644 src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicToolInputSchema.g.cs diff --git a/src/libs/DeepInfra/Generated/DeepInfra..JsonSerializerContext.g.cs b/src/libs/DeepInfra/Generated/DeepInfra..JsonSerializerContext.g.cs index 1b6500e..3a64391 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra..JsonSerializerContext.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra..JsonSerializerContext.g.cs @@ -15,6 +15,8 @@ namespace DeepInfra { typeof(global::DeepInfra.JsonConverters.SuspendReasonJsonConverter), typeof(global::DeepInfra.JsonConverters.SuspendReasonNullableJsonConverter), + typeof(global::DeepInfra.JsonConverters.AnthropicSystemContentTypeJsonConverter), + typeof(global::DeepInfra.JsonConverters.AnthropicSystemContentTypeNullableJsonConverter), typeof(global::DeepInfra.JsonConverters.BodyOpenaiAudioTranscriptionsV1AudioTranscriptionsPostResponseFormatJsonConverter), typeof(global::DeepInfra.JsonConverters.BodyOpenaiAudioTranscriptionsV1AudioTranscriptionsPostResponseFormatNullableJsonConverter), typeof(global::DeepInfra.JsonConverters.BodyOpenaiAudioTranscriptionsV1AudioTranscriptionsPostTimestampGranularitieJsonConverter), @@ -82,6 +84,8 @@ namespace DeepInfra typeof(global::DeepInfra.JsonConverters.ContainerRentalsListV1ContainersGetStateJsonConverter), typeof(global::DeepInfra.JsonConverters.ContainerRentalsListV1ContainersGetStateNullableJsonConverter), typeof(global::DeepInfra.JsonConverters.AnyOfJsonConverter), + typeof(global::DeepInfra.JsonConverters.AnyOfJsonConverter>), + typeof(global::DeepInfra.JsonConverters.AnyOfJsonConverter>), typeof(global::DeepInfra.JsonConverters.AnyOfJsonConverter>), typeof(global::DeepInfra.JsonConverters.AnyOfJsonConverter>), typeof(global::DeepInfra.JsonConverters.AnyOfJsonConverter>>), diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.AnthropicMessages.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.AnthropicMessages.g.cs new file mode 100644 index 0000000..60d497e --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.AnthropicMessages.g.cs @@ -0,0 +1,341 @@ + +#nullable enable + +namespace DeepInfra +{ + public partial class DeepInfraClient + { + partial void PrepareAnthropicMessagesArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? authorization, + ref string? xApiKey, + ref string? anthropicVersion, + ref string? anthropicBeta, + ref string? xDeepinfraSource, + ref string? userAgent, + global::DeepInfra.AnthropicMessagesIn request); + partial void PrepareAnthropicMessagesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? authorization, + string? xApiKey, + string? anthropicVersion, + string? anthropicBeta, + string? xDeepinfraSource, + string? userAgent, + global::DeepInfra.AnthropicMessagesIn request); + partial void ProcessAnthropicMessagesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAnthropicMessagesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Anthropic Messages + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AnthropicMessagesAsync( + global::DeepInfra.AnthropicMessagesIn request, + string? authorization = default, + string? xApiKey = default, + string? anthropicVersion = default, + string? anthropicBeta = default, + string? xDeepinfraSource = default, + string? userAgent = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareAnthropicMessagesArguments( + httpClient: HttpClient, + authorization: ref authorization, + xApiKey: ref xApiKey, + anthropicVersion: ref anthropicVersion, + anthropicBeta: ref anthropicBeta, + xDeepinfraSource: ref xDeepinfraSource, + userAgent: ref userAgent, + request: request); + + var __pathBuilder = new global::DeepInfra.PathBuilder( + path: "/anthropic/v1/messages", + 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)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + 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 (authorization != default) + { + __httpRequest.Headers.TryAddWithoutValidation("authorization", authorization.ToString()); + } + if (xApiKey != default) + { + __httpRequest.Headers.TryAddWithoutValidation("x-api-key", xApiKey.ToString()); + } + if (anthropicVersion != default) + { + __httpRequest.Headers.TryAddWithoutValidation("anthropic-version", anthropicVersion.ToString()); + } + if (anthropicBeta != default) + { + __httpRequest.Headers.TryAddWithoutValidation("anthropic-beta", anthropicBeta.ToString()); + } + if (xDeepinfraSource != default) + { + __httpRequest.Headers.TryAddWithoutValidation("x-deepinfra-source", xDeepinfraSource.ToString()); + } + if (userAgent != default) + { + __httpRequest.Headers.TryAddWithoutValidation("user-agent", userAgent.ToString()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAnthropicMessagesRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + authorization: authorization, + xApiKey: xApiKey, + anthropicVersion: anthropicVersion, + anthropicBeta: anthropicBeta, + xDeepinfraSource: xDeepinfraSource, + userAgent: userAgent, + 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); + ProcessAnthropicMessagesResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + try + { + 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); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::DeepInfra.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + 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( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAnthropicMessagesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return __content; + } + catch (global::System.Exception __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), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return __content; + } + catch (global::System.Exception __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), + }; + } + } + } + + /// + /// Anthropic Messages + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: false + /// + /// + /// Default Value: 1 + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AnthropicMessagesAsync( + string model, + global::System.Collections.Generic.IList messages, + string? authorization = default, + string? xApiKey = default, + string? anthropicVersion = default, + string? anthropicBeta = default, + string? xDeepinfraSource = default, + string? userAgent = default, + int? maxTokens = default, + global::DeepInfra.AnyOf>? system = default, + global::System.Collections.Generic.IList? stopSequences = default, + bool? stream = default, + double? temperature = default, + double? topP = default, + int? topK = default, + object? metadata = default, + global::System.Collections.Generic.IList? tools = default, + object? toolChoice = default, + global::DeepInfra.AnthropicThinkingConfig? thinking = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::DeepInfra.AnthropicMessagesIn + { + Model = model, + MaxTokens = maxTokens, + Messages = messages, + System = system, + StopSequences = stopSequences, + Stream = stream, + Temperature = temperature, + TopP = topP, + TopK = topK, + Metadata = metadata, + Tools = tools, + ToolChoice = toolChoice, + Thinking = thinking, + }; + + return await AnthropicMessagesAsync( + authorization: authorization, + xApiKey: xApiKey, + anthropicVersion: anthropicVersion, + anthropicBeta: anthropicBeta, + xDeepinfraSource: xDeepinfraSource, + userAgent: userAgent, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.AnthropicMessagesCountTokens.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.AnthropicMessagesCountTokens.g.cs new file mode 100644 index 0000000..4dcbcc2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.AnthropicMessagesCountTokens.g.cs @@ -0,0 +1,264 @@ + +#nullable enable + +namespace DeepInfra +{ + public partial class DeepInfraClient + { + partial void PrepareAnthropicMessagesCountTokensArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? authorization, + ref string? xApiKey, + global::DeepInfra.AnthropicTokenCountRequest request); + partial void PrepareAnthropicMessagesCountTokensRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? authorization, + string? xApiKey, + global::DeepInfra.AnthropicTokenCountRequest request); + partial void ProcessAnthropicMessagesCountTokensResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessAnthropicMessagesCountTokensResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Anthropic Messages Count Tokens + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AnthropicMessagesCountTokensAsync( + global::DeepInfra.AnthropicTokenCountRequest request, + string? authorization = default, + string? xApiKey = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareAnthropicMessagesCountTokensArguments( + httpClient: HttpClient, + authorization: ref authorization, + xApiKey: ref xApiKey, + request: request); + + var __pathBuilder = new global::DeepInfra.PathBuilder( + path: "/anthropic/v1/messages/count_tokens", + 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)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + 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 (authorization != default) + { + __httpRequest.Headers.TryAddWithoutValidation("authorization", authorization.ToString()); + } + if (xApiKey != default) + { + __httpRequest.Headers.TryAddWithoutValidation("x-api-key", xApiKey.ToString()); + } + + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAnthropicMessagesCountTokensRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + authorization: authorization, + xApiKey: xApiKey, + 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); + ProcessAnthropicMessagesCountTokensResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + try + { + 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); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::DeepInfra.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + 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( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAnthropicMessagesCountTokensResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return __content; + } + catch (global::System.Exception __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), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return __content; + } + catch (global::System.Exception __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), + }; + } + } + } + + /// + /// Anthropic Messages Count Tokens + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AnthropicMessagesCountTokensAsync( + string model, + global::System.Collections.Generic.IList messages, + string? authorization = default, + string? xApiKey = default, + global::DeepInfra.AnyOf>? system = default, + global::System.Collections.Generic.IList? tools = default, + global::DeepInfra.AnthropicThinkingConfig? thinking = default, + object? toolChoice = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::DeepInfra.AnthropicTokenCountRequest + { + Model = model, + Messages = messages, + System = system, + Tools = tools, + Thinking = thinking, + ToolChoice = toolChoice, + }; + + return await AnthropicMessagesCountTokensAsync( + authorization: authorization, + xApiKey: xApiKey, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.AnthropicMessages.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.AnthropicMessages.g.cs new file mode 100644 index 0000000..23eb2c6 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.AnthropicMessages.g.cs @@ -0,0 +1,79 @@ +#nullable enable + +namespace DeepInfra +{ + public partial interface IDeepInfraClient + { + /// + /// Anthropic Messages + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AnthropicMessagesAsync( + global::DeepInfra.AnthropicMessagesIn request, + string? authorization = default, + string? xApiKey = default, + string? anthropicVersion = default, + string? anthropicBeta = default, + string? xDeepinfraSource = default, + string? userAgent = default, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Anthropic Messages + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: false + /// + /// + /// Default Value: 1 + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AnthropicMessagesAsync( + string model, + global::System.Collections.Generic.IList messages, + string? authorization = default, + string? xApiKey = default, + string? anthropicVersion = default, + string? anthropicBeta = default, + string? xDeepinfraSource = default, + string? userAgent = default, + int? maxTokens = default, + global::DeepInfra.AnyOf>? system = default, + global::System.Collections.Generic.IList? stopSequences = default, + bool? stream = default, + double? temperature = default, + double? topP = default, + int? topK = default, + object? metadata = default, + global::System.Collections.Generic.IList? tools = default, + object? toolChoice = default, + global::DeepInfra.AnthropicThinkingConfig? thinking = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.AnthropicMessagesCountTokens.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.AnthropicMessagesCountTokens.g.cs new file mode 100644 index 0000000..7d287ff --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.AnthropicMessagesCountTokens.g.cs @@ -0,0 +1,45 @@ +#nullable enable + +namespace DeepInfra +{ + public partial interface IDeepInfraClient + { + /// + /// Anthropic Messages Count Tokens + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AnthropicMessagesCountTokensAsync( + global::DeepInfra.AnthropicTokenCountRequest request, + string? authorization = default, + string? xApiKey = default, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Anthropic Messages Count Tokens + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AnthropicMessagesCountTokensAsync( + string model, + global::System.Collections.Generic.IList messages, + string? authorization = default, + string? xApiKey = default, + global::DeepInfra.AnyOf>? system = default, + global::System.Collections.Generic.IList? tools = default, + global::DeepInfra.AnthropicThinkingConfig? thinking = default, + object? toolChoice = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.JsonConverters.AnthropicSystemContentType.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.JsonConverters.AnthropicSystemContentType.g.cs new file mode 100644 index 0000000..0fa7c7d --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.JsonConverters.AnthropicSystemContentType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace DeepInfra.JsonConverters +{ + /// + public sealed class AnthropicSystemContentTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.AnthropicSystemContentType 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.AnthropicSystemContentTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.AnthropicSystemContentType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::DeepInfra.AnthropicSystemContentType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.AnthropicSystemContentType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::DeepInfra.AnthropicSystemContentTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/DeepInfra/Generated/DeepInfra.JsonConverters.AnthropicSystemContentTypeNullable.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.JsonConverters.AnthropicSystemContentTypeNullable.g.cs new file mode 100644 index 0000000..ce5b5c0 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.JsonConverters.AnthropicSystemContentTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace DeepInfra.JsonConverters +{ + /// + public sealed class AnthropicSystemContentTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::DeepInfra.AnthropicSystemContentType? 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.AnthropicSystemContentTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::DeepInfra.AnthropicSystemContentType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::DeepInfra.AnthropicSystemContentType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::DeepInfra.AnthropicSystemContentType? 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.AnthropicSystemContentTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/DeepInfra/Generated/DeepInfra.JsonSerializerContextTypes.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.JsonSerializerContextTypes.g.cs index 28b1e78..f450089 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.JsonSerializerContextTypes.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.JsonSerializerContextTypes.g.cs @@ -138,782 +138,818 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::DeepInfra.ApiToken? Type28 { get; set; } + public global::DeepInfra.AnthropicMessagesIn? Type28 { get; set; } /// /// /// - public global::System.DateTimeOffset? Type29 { get; set; } + public global::System.Collections.Generic.IList? Type29 { get; set; } /// /// /// - public global::DeepInfra.ApiTokenIn? Type30 { get; set; } + public object? Type30 { get; set; } /// /// /// - public global::DeepInfra.ApiTokenVercelExportIn? Type31 { get; set; } + public global::DeepInfra.AnyOf>? Type31 { get; set; } /// /// /// - public global::DeepInfra.BodyCreateVoiceV1VoicesAddPost? Type32 { get; set; } + public global::System.Collections.Generic.IList? Type32 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type33 { get; set; } + public global::DeepInfra.AnthropicSystemContent? Type33 { get; set; } /// /// /// - public byte[]? Type34 { get; set; } + public global::DeepInfra.AnthropicSystemContentType? Type34 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1AudioTranscriptionsPost? Type35 { get; set; } + public global::System.Collections.Generic.IList? Type35 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1AudioTranscriptionsPostResponseFormat? Type36 { get; set; } + public global::System.Collections.Generic.IList? Type36 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type37 { get; set; } + public global::DeepInfra.AnthropicTool? Type37 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1AudioTranscriptionsPostTimestampGranularitie? Type38 { get; set; } + public global::DeepInfra.AnthropicThinkingConfig? Type38 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost? Type39 { get; set; } + public global::DeepInfra.AnthropicTokenCountRequest? Type39 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat? Type40 { get; set; } + public global::DeepInfra.ApiToken? Type40 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type41 { get; set; } + public global::System.DateTimeOffset? Type41 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie? Type42 { get; set; } + public global::DeepInfra.ApiTokenIn? Type42 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiAudioTranslationsV1AudioTranslationsPost? Type43 { get; set; } + public global::DeepInfra.ApiTokenVercelExportIn? Type43 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiAudioTranslationsV1AudioTranslationsPostResponseFormat? Type44 { get; set; } + public global::DeepInfra.BodyCreateVoiceV1VoicesAddPost? Type44 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost? Type45 { get; set; } + public global::System.Collections.Generic.IList? Type45 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat? Type46 { get; set; } + public byte[]? Type46 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiFilesV1FilesPost? Type47 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1AudioTranscriptionsPost? Type47 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost? Type48 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1AudioTranscriptionsPostResponseFormat? Type48 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiImagesEditsV1ImagesEditsPost? Type49 { get; set; } + public global::System.Collections.Generic.IList? Type49 { get; set; } /// /// /// - public global::DeepInfra.OpenAIImagesEditsIn? Type50 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1AudioTranscriptionsPostTimestampGranularitie? Type50 { get; set; } /// /// /// - public global::DeepInfra.OpenAIImagesResponseFormat? Type51 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost? Type51 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiImagesEditsV1OpenaiImagesEditsPost? Type52 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat? Type52 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiImagesVariationsV1ImagesVariationsPost? Type53 { get; set; } + public global::System.Collections.Generic.IList? Type53 { get; set; } /// /// /// - public global::DeepInfra.OpenAIImagesVariationsIn? Type54 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie? Type54 { get; set; } /// /// /// - public global::DeepInfra.BodyOpenaiImagesVariationsV1OpenaiImagesVariationsPost? Type55 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranslationsV1AudioTranslationsPost? Type55 { get; set; } /// /// /// - public global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost? Type56 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranslationsV1AudioTranslationsPostResponseFormat? Type56 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionAssistantMessage? Type57 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost? Type57 { get; set; } /// /// /// - public object? Type58 { get; set; } + public global::DeepInfra.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat? Type58 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionAssistantMessageRole? Type59 { get; set; } + public global::DeepInfra.BodyOpenaiFilesV1FilesPost? Type59 { get; set; } /// /// /// - public global::DeepInfra.AnyOf>? Type60 { get; set; } + public global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost? Type60 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type61 { get; set; } + public global::DeepInfra.BodyOpenaiImagesEditsV1ImagesEditsPost? Type61 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionContentPartText? Type62 { get; set; } + public global::DeepInfra.OpenAIImagesEditsIn? Type62 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionContentPartTextType? Type63 { get; set; } + public global::DeepInfra.OpenAIImagesResponseFormat? Type63 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type64 { get; set; } + public global::DeepInfra.BodyOpenaiImagesEditsV1OpenaiImagesEditsPost? Type64 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionMessageToolCall? Type65 { get; set; } + public global::DeepInfra.BodyOpenaiImagesVariationsV1ImagesVariationsPost? Type65 { get; set; } /// /// /// - public global::DeepInfra.Function? Type66 { get; set; } + public global::DeepInfra.OpenAIImagesVariationsIn? Type66 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionContentPartAudio? Type67 { get; set; } + public global::DeepInfra.BodyOpenaiImagesVariationsV1OpenaiImagesVariationsPost? Type67 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionContentPartAudioType? Type68 { get; set; } + public global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost? Type68 { get; set; } /// /// /// - public global::DeepInfra.InputAudio? Type69 { get; set; } + public global::DeepInfra.ChatCompletionAssistantMessage? Type69 { get; set; } /// /// /// - public global::DeepInfra.InputAudioFormat? Type70 { get; set; } + public global::DeepInfra.ChatCompletionAssistantMessageRole? Type70 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionContentPartImage? Type71 { get; set; } + public global::DeepInfra.AnyOf>? Type71 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionContentPartImageType? Type72 { get; set; } + public global::System.Collections.Generic.IList? Type72 { get; set; } /// /// /// - public global::DeepInfra.ImageURL? Type73 { get; set; } + public global::DeepInfra.ChatCompletionContentPartText? Type73 { get; set; } /// /// /// - public global::DeepInfra.ImageURLDetail? Type74 { get; set; } + public global::DeepInfra.ChatCompletionContentPartTextType? Type74 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionSystemMessage? Type75 { get; set; } + public global::System.Collections.Generic.IList? Type75 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionSystemMessageRole? Type76 { get; set; } + public global::DeepInfra.ChatCompletionMessageToolCall? Type76 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionToolMessage? Type77 { get; set; } + public global::DeepInfra.Function? Type77 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionToolMessageRole? Type78 { get; set; } + public global::DeepInfra.ChatCompletionContentPartAudio? Type78 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionUserMessage? Type79 { get; set; } + public global::DeepInfra.ChatCompletionContentPartAudioType? Type79 { get; set; } /// /// /// - public global::DeepInfra.ChatCompletionUserMessageRole? Type80 { get; set; } + public global::DeepInfra.InputAudio? Type80 { get; set; } /// /// /// - public global::DeepInfra.AnyOf>>? Type81 { get; set; } + public global::DeepInfra.InputAudioFormat? Type81 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type82 { get; set; } + public global::DeepInfra.ChatCompletionContentPartImage? Type82 { get; set; } /// /// /// - public global::DeepInfra.AnyOf? Type83 { get; set; } + public global::DeepInfra.ChatCompletionContentPartImageType? Type83 { get; set; } /// /// /// - public global::DeepInfra.ChatTools? Type84 { get; set; } + public global::DeepInfra.ImageURL? Type84 { get; set; } /// /// /// - public global::DeepInfra.FunctionDefinition? Type85 { get; set; } + public global::DeepInfra.ImageURLDetail? Type85 { get; set; } /// /// /// - public global::DeepInfra.ContainerRentalOut? Type86 { get; set; } + public global::DeepInfra.ChatCompletionSystemMessage? Type86 { get; set; } /// /// /// - public global::DeepInfra.ContainerRentalStateOut? Type87 { get; set; } + public global::DeepInfra.ChatCompletionSystemMessageRole? Type87 { get; set; } /// /// /// - public global::DeepInfra.ContainerRentalStartIn? Type88 { get; set; } + public global::DeepInfra.ChatCompletionToolMessage? Type88 { get; set; } /// /// /// - public global::DeepInfra.ContainerRentalStartOut? Type89 { get; set; } + public global::DeepInfra.ChatCompletionToolMessageRole? Type89 { get; set; } /// /// /// - public global::DeepInfra.ContainerRentalUpdateIn? Type90 { get; set; } + public global::DeepInfra.ChatCompletionUserMessage? Type90 { get; set; } /// /// /// - public global::DeepInfra.CreateLoraApiRequest? Type91 { get; set; } + public global::DeepInfra.ChatCompletionUserMessageRole? Type91 { get; set; } /// /// /// - public global::DeepInfra.SourceModel? Type92 { get; set; } + public global::DeepInfra.AnyOf>>? Type92 { get; set; } /// /// /// - public global::DeepInfra.SourceTypeEnum? Type93 { get; set; } + public global::System.Collections.Generic.IList>? Type93 { get; set; } /// /// /// - public global::DeepInfra.DeepError? Type94 { get; set; } + public global::DeepInfra.AnyOf? Type94 { get; set; } /// /// /// - public global::DeepInfra.DeployDelete? Type95 { get; set; } + public global::DeepInfra.ChatTools? Type95 { get; set; } /// /// /// - public global::DeepInfra.DeployGPUAvailability? Type96 { get; set; } + public global::DeepInfra.FunctionDefinition? Type96 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type97 { get; set; } + public global::DeepInfra.ContainerRentalOut? Type97 { get; set; } /// /// /// - public global::DeepInfra.GPUAvailabilityInfo? Type98 { get; set; } + public global::DeepInfra.ContainerRentalStateOut? Type98 { get; set; } /// /// /// - public global::DeepInfra.DeployGPUs? Type99 { get; set; } + public global::DeepInfra.ContainerRentalStartIn? Type99 { get; set; } /// /// /// - public global::DeepInfra.DeployInstances? Type100 { get; set; } + public global::DeepInfra.ContainerRentalStartOut? Type100 { get; set; } /// /// /// - public global::DeepInfra.DeployLLMConfig? Type101 { get; set; } + public global::DeepInfra.ContainerRentalUpdateIn? Type101 { get; set; } /// /// /// - public global::DeepInfra.HFWeights? Type102 { get; set; } + public global::DeepInfra.CreateLoraApiRequest? Type102 { get; set; } /// /// /// - public global::DeepInfra.DeployLLMIn? Type103 { get; set; } + public global::DeepInfra.SourceModel? Type103 { get; set; } /// /// /// - public global::DeepInfra.ScaleSettings? Type104 { get; set; } + public global::DeepInfra.SourceTypeEnum? Type104 { get; set; } /// /// /// - public global::DeepInfra.DeployLLMUpdateIn? Type105 { get; set; } + public global::DeepInfra.DeepError? Type105 { get; set; } /// /// /// - public global::DeepInfra.DeployModelIn? Type106 { get; set; } + public global::DeepInfra.DeployDelete? Type106 { get; set; } /// /// /// - public global::DeepInfra.ModelProvider? Type107 { get; set; } + public global::DeepInfra.DeployGPUAvailability? Type107 { get; set; } /// /// /// - public global::DeepInfra.DeployResult? Type108 { get; set; } + public global::System.Collections.Generic.IList? Type108 { get; set; } /// /// /// - public global::DeepInfra.DeployStatusOut? Type109 { get; set; } + public global::DeepInfra.GPUAvailabilityInfo? Type109 { get; set; } /// /// /// - public global::DeepInfra.DeployType? Type110 { get; set; } + public global::DeepInfra.DeployGPUs? Type110 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type111 { get; set; } + public global::DeepInfra.DeployInstances? Type111 { get; set; } /// /// /// - public global::DeepInfra.DeploymentLogQueryOut? Type112 { get; set; } + public global::DeepInfra.DeployLLMConfig? Type112 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary>>? Type113 { get; set; } + public global::DeepInfra.HFWeights? Type113 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type114 { get; set; } + public global::DeepInfra.DeployLLMIn? Type114 { get; set; } /// /// /// - public global::DeepInfra.DeploymentOut? Type115 { get; set; } + public global::DeepInfra.ScaleSettings? Type115 { get; set; } /// /// /// - public global::DeepInfra.DeploymentStatsOut? Type116 { get; set; } + public global::DeepInfra.DeployLLMUpdateIn? Type116 { get; set; } /// /// /// - public global::DeepInfra.DetailedDeploymentStatsOut? Type117 { get; set; } + public global::DeepInfra.DeployModelIn? Type117 { get; set; } /// /// /// - public global::DeepInfra.LLMDeploymentStatsOut? Type118 { get; set; } + public global::DeepInfra.ModelProvider? Type118 { get; set; } /// /// /// - public global::DeepInfra.EmbeddingsDeploymentStatsOut? Type119 { get; set; } + public global::DeepInfra.DeployResult? Type119 { get; set; } /// /// /// - public global::DeepInfra.TimeDeploymentStatsOut? Type120 { get; set; } + public global::DeepInfra.DeployStatusOut? Type120 { get; set; } /// /// /// - public global::DeepInfra.DisplayNameIn? Type121 { get; set; } + public global::DeepInfra.DeployType? Type121 { get; set; } /// /// /// - public global::DeepInfra.ElevenLabsTextToSpeechIn? Type122 { get; set; } + public global::DeepInfra.DeploymentLogQueryOut? Type122 { get; set; } /// /// /// - public global::DeepInfra.TtsResponseFormat? Type123 { get; set; } + public global::System.Collections.Generic.Dictionary>>? Type123 { get; set; } /// /// /// - public global::DeepInfra.EmailsOut? Type124 { get; set; } + public global::System.Collections.Generic.IList>? Type124 { get; set; } /// /// /// - public global::DeepInfra.FAQEntryOut? Type125 { get; set; } + public global::DeepInfra.DeploymentOut? Type125 { get; set; } /// /// /// - public global::DeepInfra.FeedbackIn? Type126 { get; set; } + public global::DeepInfra.DeploymentStatsOut? Type126 { get; set; } /// /// /// - public global::DeepInfra.GetVoicesOut? Type127 { get; set; } + public global::DeepInfra.DetailedDeploymentStatsOut? Type127 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type128 { get; set; } + public global::DeepInfra.LLMDeploymentStatsOut? Type128 { get; set; } /// /// /// - public global::DeepInfra.Voice? Type129 { get; set; } + public global::DeepInfra.EmbeddingsDeploymentStatsOut? Type129 { get; set; } /// /// /// - public global::DeepInfra.HFModel? Type130 { get; set; } + public global::DeepInfra.TimeDeploymentStatsOut? Type130 { get; set; } /// /// /// - public global::DeepInfra.HFTasksE? Type131 { get; set; } + public global::DeepInfra.DisplayNameIn? Type131 { get; set; } /// /// /// - public global::DeepInfra.InspectScopedJWTOut? Type132 { get; set; } + public global::DeepInfra.ElevenLabsTextToSpeechIn? Type132 { get; set; } /// /// /// - public global::DeepInfra.JsonSchema? Type133 { get; set; } + public global::DeepInfra.TtsResponseFormat? Type133 { get; set; } /// /// /// - public global::DeepInfra.LogQueryOut? Type134 { get; set; } + public global::DeepInfra.EmailsOut? Type134 { get; set; } /// /// /// - public global::DeepInfra.LoraModelUploadIn? Type135 { get; set; } + public global::DeepInfra.FAQEntryOut? Type135 { get; set; } /// /// /// - public global::DeepInfra.Me? Type136 { get; set; } + public global::DeepInfra.FeedbackIn? Type136 { get; set; } /// /// /// - public global::DeepInfra.MeVercelConnection? Type137 { get; set; } + public global::DeepInfra.GetVoicesOut? Type137 { get; set; } /// /// /// - public global::DeepInfra.MeIn? Type138 { get; set; } + public global::System.Collections.Generic.IList? Type138 { get; set; } /// /// /// - public global::DeepInfra.ModelDocBlock? Type139 { get; set; } + public global::DeepInfra.Voice? Type139 { get; set; } /// /// /// - public global::DeepInfra.ModelDocBlockKey? Type140 { get; set; } + public global::DeepInfra.HFModel? Type140 { get; set; } /// /// /// - public global::DeepInfra.ModelFamilyOut? Type141 { get; set; } + public global::DeepInfra.HFTasksE? Type141 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type142 { get; set; } + public global::DeepInfra.InspectScopedJWTOut? Type142 { get; set; } /// /// /// - public global::DeepInfra.PricingPageSectionOut? Type143 { get; set; } + public global::DeepInfra.JsonSchema? Type143 { get; set; } /// /// /// - public global::DeepInfra.PricingType? Type144 { get; set; } + public global::DeepInfra.LogQueryOut? Type144 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type145 { get; set; } + public global::DeepInfra.LoraModelUploadIn? Type145 { get; set; } /// /// /// - public global::DeepInfra.PricingPageEntryOut? Type146 { get; set; } + public global::DeepInfra.Me? Type146 { get; set; } /// /// /// - public global::DeepInfra.AnyOf? Type147 { get; set; } + public global::DeepInfra.MeVercelConnection? Type147 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingTime? Type148 { get; set; } + public global::DeepInfra.MeIn? Type148 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingTokens? Type149 { get; set; } + public global::DeepInfra.ModelDocBlock? Type149 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingInputLength? Type150 { get; set; } + public global::DeepInfra.ModelDocBlockKey? Type150 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingInputTokens? Type151 { get; set; } + public global::DeepInfra.ModelFamilyOut? Type151 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingUptime? Type152 { get; set; } + public global::System.Collections.Generic.IList? Type152 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingInputCharacterLength? Type153 { get; set; } + public global::DeepInfra.PricingPageSectionOut? Type153 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingImageUnits? Type154 { get; set; } + public global::DeepInfra.PricingType? Type154 { get; set; } /// /// /// - public global::DeepInfra.ModelPricingOutputLength? Type155 { get; set; } + public global::System.Collections.Generic.IList? Type155 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type156 { get; set; } + public global::DeepInfra.PricingPageEntryOut? Type156 { get; set; } /// /// /// - public global::DeepInfra.ModelFieldInfo? Type157 { get; set; } + public global::DeepInfra.AnyOf? Type157 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type158 { get; set; } + public global::DeepInfra.ModelPricingTime? Type158 { get; set; } /// /// /// - public global::DeepInfra.ModelInfoOut? Type159 { get; set; } + public global::DeepInfra.ModelPricingTokens? Type159 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type160 { get; set; } + public global::DeepInfra.ModelPricingInputLength? Type160 { get; set; } /// /// /// - public global::DeepInfra.AnyOf? Type161 { get; set; } + public global::DeepInfra.ModelPricingInputTokens? Type161 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type162 { get; set; } + public global::DeepInfra.ModelPricingUptime? Type162 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type163 { get; set; } + public global::DeepInfra.ModelPricingInputCharacterLength? Type163 { get; set; } /// /// /// - public global::DeepInfra.SchemaVariant? Type164 { get; set; } + public global::DeepInfra.ModelPricingImageUnits? Type164 { get; set; } /// /// /// - public global::DeepInfra.SchemaVariantKey? Type165 { get; set; } + public global::DeepInfra.ModelPricingOutputLength? Type165 { get; set; } /// /// /// - public global::DeepInfra.ModelMetaIn? Type166 { get; set; } + public global::System.Collections.Generic.IList? Type166 { get; set; } /// /// /// - public global::DeepInfra.ModelMetadata? Type167 { get; set; } + public global::DeepInfra.ModelFieldInfo? Type167 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type168 { get; set; } + public global::DeepInfra.ModelInfoOut? Type168 { get; set; } /// /// /// - public global::DeepInfra.ModelOut? Type169 { get; set; } + public global::System.Collections.Generic.IList? Type169 { get; set; } /// /// /// - public global::DeepInfra.ModelPublicityIn? Type170 { get; set; } + public global::DeepInfra.AnyOf? Type170 { get; set; } /// /// /// - public global::DeepInfra.ModelVersionOut? Type171 { get; set; } + public global::System.Collections.Generic.IList? Type171 { get; set; } /// /// /// - public global::DeepInfra.OpenAIBatch? Type172 { get; set; } + public global::System.Collections.Generic.IList? Type172 { get; set; } /// /// /// - public global::DeepInfra.OpenAIBatchesIn? Type173 { get; set; } + public global::DeepInfra.SchemaVariant? Type173 { get; set; } /// /// /// - public global::DeepInfra.OpenAIBatchesInEndpoint? Type174 { get; set; } + public global::DeepInfra.SchemaVariantKey? Type174 { get; set; } /// /// /// - public global::DeepInfra.OpenAIBatchesInCompletionWindow? Type175 { get; set; } + public global::DeepInfra.ModelMetaIn? Type175 { get; set; } /// /// /// - public global::DeepInfra.OpenAIChatCompletionsIn? Type176 { get; set; } + public global::DeepInfra.ModelMetadata? Type176 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type177 { get; set; } + public global::System.Collections.Generic.Dictionary? Type177 { get; set; } /// /// /// - public global::DeepInfra.AnyOf? Type178 { get; set; } + public global::DeepInfra.ModelOut? Type178 { get; set; } /// /// /// - public global::DeepInfra.AnyOf>? Type179 { get; set; } + public global::DeepInfra.ModelPublicityIn? Type179 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type180 { get; set; } + public global::DeepInfra.ModelVersionOut? Type180 { get; set; } /// /// /// - public global::DeepInfra.AnyOf? Type181 { get; set; } + public global::DeepInfra.OpenAIBatch? Type181 { get; set; } /// /// /// - public global::DeepInfra.ResponseFormat? Type182 { get; set; } + public global::DeepInfra.OpenAIBatchesIn? Type182 { get; set; } /// /// /// - public global::DeepInfra.ResponseFormatType? Type183 { get; set; } + public global::DeepInfra.OpenAIBatchesInEndpoint? Type183 { get; set; } /// /// /// - public global::DeepInfra.StreamOptions? Type184 { get; set; } + public global::DeepInfra.OpenAIBatchesInCompletionWindow? Type184 { get; set; } /// /// /// - public global::DeepInfra.OpenAIChatCompletionsInReasoningEffort? Type185 { get; set; } + public global::DeepInfra.OpenAIChatCompletionsIn? Type185 { get; set; } /// /// /// - public global::DeepInfra.OpenAICompletionsIn? Type186 { get; set; } + public global::System.Collections.Generic.IList>? Type186 { get; set; } /// /// /// - public global::DeepInfra.AnyOf>? Type187 { get; set; } + public global::DeepInfra.AnyOf? Type187 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type188 { get; set; } + public global::DeepInfra.AnyOf>? Type188 { get; set; } /// /// /// - public global::DeepInfra.OpenAIEmbeddingsIn? Type189 { get; set; } + public global::System.Collections.Generic.IList? Type189 { get; set; } /// /// /// - public global::DeepInfra.ServiceTier? Type190 { get; set; } + public global::DeepInfra.AnyOf? Type190 { get; set; } /// /// /// - public global::DeepInfra.AnyOf, string>? Type191 { get; set; } + public global::DeepInfra.ResponseFormat? Type191 { get; set; } /// /// /// - public global::DeepInfra.OpenAIEmbeddingsInEncodingFormat? Type192 { get; set; } + public global::DeepInfra.ResponseFormatType? Type192 { get; set; } /// /// /// - public global::DeepInfra.OpenAIImageData? Type193 { get; set; } + public global::DeepInfra.StreamOptions? Type193 { get; set; } /// /// /// - public global::DeepInfra.OpenAIImagesGenerationsIn? Type194 { get; set; } + public global::DeepInfra.OpenAIChatCompletionsInReasoningEffort? Type194 { get; set; } /// /// /// - public global::DeepInfra.OpenAIImagesOut? Type195 { get; set; } + public global::DeepInfra.OpenAICompletionsIn? Type195 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type196 { get; set; } + public global::DeepInfra.AnyOf>? Type196 { get; set; } /// /// /// - public global::DeepInfra.OpenAIModelOut? Type197 { get; set; } + public global::System.Collections.Generic.IList? Type197 { get; set; } /// /// /// - public global::DeepInfra.OpenAIModelsOut? Type198 { get; set; } + public global::DeepInfra.OpenAIEmbeddingsIn? Type198 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type199 { get; set; } + public global::DeepInfra.ServiceTier? Type199 { get; set; } /// /// /// - public global::DeepInfra.OpenAITextToSpeechIn? Type200 { get; set; } + public global::DeepInfra.AnyOf, string>? Type200 { get; set; } /// /// /// - public global::DeepInfra.OpenRouterDatacenter? Type201 { get; set; } + public global::DeepInfra.OpenAIEmbeddingsInEncodingFormat? Type201 { get; set; } /// /// /// - public global::DeepInfra.OpenRouterModelData? Type202 { get; set; } + public global::DeepInfra.OpenAIImageData? Type202 { get; set; } /// /// /// - public global::DeepInfra.OpenRouterPricing? Type203 { get; set; } + public global::DeepInfra.OpenAIImagesGenerationsIn? Type203 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type204 { get; set; } + public global::DeepInfra.OpenAIImagesOut? Type204 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type205 { get; set; } + public global::System.Collections.Generic.IList? Type205 { get; set; } /// /// /// - public global::DeepInfra.OpenRouterModelsOut? Type206 { get; set; } + public global::DeepInfra.OpenAIModelOut? Type206 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type207 { get; set; } + public global::DeepInfra.OpenAIModelsOut? Type207 { get; set; } /// /// /// - public global::DeepInfra.RateLimitOut? Type208 { get; set; } + public global::System.Collections.Generic.IList? Type208 { get; set; } /// /// /// - public global::DeepInfra.RateLimitRequestIn? Type209 { get; set; } + public global::DeepInfra.OpenAITextToSpeechIn? Type209 { get; set; } /// /// /// - public global::DeepInfra.SchemaOut? Type210 { get; set; } + public global::DeepInfra.OpenRouterDatacenter? Type210 { get; set; } /// /// /// - public global::DeepInfra.ScopedJWTIn? Type211 { get; set; } + public global::DeepInfra.OpenRouterModelData? Type211 { get; set; } /// /// /// - public global::DeepInfra.ScopedJWTOut? Type212 { get; set; } + public global::DeepInfra.OpenRouterPricing? Type212 { get; set; } /// /// /// - public global::DeepInfra.SshKeyIn? Type213 { get; set; } + public global::System.Collections.Generic.Dictionary? Type213 { get; set; } /// /// /// - public global::DeepInfra.SshKeyOut? Type214 { get; set; } + public global::System.Collections.Generic.IList? Type214 { get; set; } /// /// /// - public global::DeepInfra.UpdateLoraApiRequest? Type215 { get; set; } + public global::DeepInfra.OpenRouterModelsOut? Type215 { get; set; } /// /// /// - public global::DeepInfra.ContainerRentalsListV1ContainersGetState? Type216 { get; set; } + public global::System.Collections.Generic.IList? Type216 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type217 { get; set; } + public global::DeepInfra.RateLimitOut? Type217 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type218 { get; set; } + public global::DeepInfra.RateLimitRequestIn? Type218 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type219 { get; set; } + public global::DeepInfra.SchemaOut? Type219 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type220 { get; set; } + public global::DeepInfra.ScopedJWTIn? Type220 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type221 { get; set; } + public global::DeepInfra.ScopedJWTOut? Type221 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type222 { get; set; } + public global::DeepInfra.SshKeyIn? Type222 { get; set; } + /// + /// + /// + public global::DeepInfra.SshKeyOut? Type223 { get; set; } + /// + /// + /// + public global::DeepInfra.UpdateLoraApiRequest? Type224 { get; set; } + /// + /// + /// + public global::DeepInfra.ContainerRentalsListV1ContainersGetState? Type225 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type226 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type227 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type228 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type229 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type230 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type231 { get; set; } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesAnthropicV1MessagesPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesAnthropicV1MessagesPostResponse.Json.g.cs new file mode 100644 index 0000000..7225b64 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesAnthropicV1MessagesPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicMessagesAnthropicV1MessagesPostResponse + { + /// + /// 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.AnthropicMessagesAnthropicV1MessagesPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicMessagesAnthropicV1MessagesPostResponse), + jsonSerializerContext) as global::DeepInfra.AnthropicMessagesAnthropicV1MessagesPostResponse; + } + + /// + /// 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.AnthropicMessagesAnthropicV1MessagesPostResponse? 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.AnthropicMessagesAnthropicV1MessagesPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicMessagesAnthropicV1MessagesPostResponse; + } + + /// + /// 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.AnthropicMessagesAnthropicV1MessagesPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesAnthropicV1MessagesPostResponse.g.cs new file mode 100644 index 0000000..e2d97e4 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesAnthropicV1MessagesPostResponse.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicMessagesAnthropicV1MessagesPostResponse + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse.Json.g.cs new file mode 100644 index 0000000..d2707ca --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse + { + /// + /// 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.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse), + jsonSerializerContext) as global::DeepInfra.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse; + } + + /// + /// 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.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse? 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.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse; + } + + /// + /// 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.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse.g.cs new file mode 100644 index 0000000..c7b3c38 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicMessagesCountTokensAnthropicV1MessagesCountTokensPostResponse + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesIn.Json.g.cs new file mode 100644 index 0000000..675f1ce --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicMessagesIn + { + /// + /// 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.AnthropicMessagesIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicMessagesIn), + jsonSerializerContext) as global::DeepInfra.AnthropicMessagesIn; + } + + /// + /// 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.AnthropicMessagesIn? 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.AnthropicMessagesIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicMessagesIn; + } + + /// + /// 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.AnthropicMessagesIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesIn.g.cs new file mode 100644 index 0000000..ed0c909 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesIn.g.cs @@ -0,0 +1,160 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicMessagesIn + { + /// + /// + /// + [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("max_tokens")] + public int? MaxTokens { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("messages")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Messages { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("system")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::DeepInfra.JsonConverters.AnyOfJsonConverter>))] + public global::DeepInfra.AnyOf>? System { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stop_sequences")] + public global::System.Collections.Generic.IList? StopSequences { get; set; } + + /// + /// Default Value: false + /// + [global::System.Text.Json.Serialization.JsonPropertyName("stream")] + public bool? Stream { get; set; } + + /// + /// Default Value: 1 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public double? Temperature { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("top_p")] + public double? TopP { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("top_k")] + public int? TopK { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public object? Metadata { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] + public object? ToolChoice { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("thinking")] + public global::DeepInfra.AnthropicThinkingConfig? Thinking { 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: false + /// + /// + /// Default Value: 1 + /// + /// + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AnthropicMessagesIn( + string model, + global::System.Collections.Generic.IList messages, + int? maxTokens, + global::DeepInfra.AnyOf>? system, + global::System.Collections.Generic.IList? stopSequences, + bool? stream, + double? temperature, + double? topP, + int? topK, + object? metadata, + global::System.Collections.Generic.IList? tools, + object? toolChoice, + global::DeepInfra.AnthropicThinkingConfig? thinking) + { + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages)); + this.MaxTokens = maxTokens; + this.System = system; + this.StopSequences = stopSequences; + this.Stream = stream; + this.Temperature = temperature; + this.TopP = topP; + this.TopK = topK; + this.Metadata = metadata; + this.Tools = tools; + this.ToolChoice = toolChoice; + this.Thinking = thinking; + } + + /// + /// Initializes a new instance of the class. + /// + public AnthropicMessagesIn() + { + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMessage.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMessage.Json.g.cs new file mode 100644 index 0000000..8b9430b --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMessage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicMessagesInMessage + { + /// + /// 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.AnthropicMessagesInMessage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicMessagesInMessage), + jsonSerializerContext) as global::DeepInfra.AnthropicMessagesInMessage; + } + + /// + /// 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.AnthropicMessagesInMessage? 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.AnthropicMessagesInMessage), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicMessagesInMessage; + } + + /// + /// 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.AnthropicMessagesInMessage.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMessage.g.cs new file mode 100644 index 0000000..90d0151 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMessage.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicMessagesInMessage + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMetadata.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMetadata.Json.g.cs new file mode 100644 index 0000000..42aca38 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMetadata.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicMessagesInMetadata + { + /// + /// 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.AnthropicMessagesInMetadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicMessagesInMetadata), + jsonSerializerContext) as global::DeepInfra.AnthropicMessagesInMetadata; + } + + /// + /// 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.AnthropicMessagesInMetadata? 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.AnthropicMessagesInMetadata), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicMessagesInMetadata; + } + + /// + /// 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.AnthropicMessagesInMetadata.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMetadata.g.cs new file mode 100644 index 0000000..5c310f9 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInMetadata.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicMessagesInMetadata + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInToolChoice.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInToolChoice.Json.g.cs new file mode 100644 index 0000000..e1f1e44 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInToolChoice.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicMessagesInToolChoice + { + /// + /// 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.AnthropicMessagesInToolChoice? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicMessagesInToolChoice), + jsonSerializerContext) as global::DeepInfra.AnthropicMessagesInToolChoice; + } + + /// + /// 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.AnthropicMessagesInToolChoice? 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.AnthropicMessagesInToolChoice), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicMessagesInToolChoice; + } + + /// + /// 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.AnthropicMessagesInToolChoice.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInToolChoice.g.cs new file mode 100644 index 0000000..c9faa95 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicMessagesInToolChoice.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicMessagesInToolChoice + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicSystemContent.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicSystemContent.Json.g.cs new file mode 100644 index 0000000..a8d2501 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicSystemContent.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicSystemContent + { + /// + /// 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.AnthropicSystemContent? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicSystemContent), + jsonSerializerContext) as global::DeepInfra.AnthropicSystemContent; + } + + /// + /// 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.AnthropicSystemContent? 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.AnthropicSystemContent), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicSystemContent; + } + + /// + /// 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.AnthropicSystemContent.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicSystemContent.g.cs new file mode 100644 index 0000000..bf04667 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicSystemContent.g.cs @@ -0,0 +1,54 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicSystemContent + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::DeepInfra.JsonConverters.AnthropicSystemContentTypeJsonConverter))] + public global::DeepInfra.AnthropicSystemContentType Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("text")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Text { 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. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AnthropicSystemContent( + string text, + global::DeepInfra.AnthropicSystemContentType type) + { + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public AnthropicSystemContent() + { + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicSystemContentType.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicSystemContentType.g.cs new file mode 100644 index 0000000..f1a82bb --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicSystemContentType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public enum AnthropicSystemContentType + { + /// + /// + /// + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AnthropicSystemContentTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AnthropicSystemContentType value) + { + return value switch + { + AnthropicSystemContentType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AnthropicSystemContentType? ToEnum(string value) + { + return value switch + { + "text" => AnthropicSystemContentType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicThinkingConfig.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicThinkingConfig.Json.g.cs new file mode 100644 index 0000000..998dac2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicThinkingConfig.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicThinkingConfig + { + /// + /// 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.AnthropicThinkingConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicThinkingConfig), + jsonSerializerContext) as global::DeepInfra.AnthropicThinkingConfig; + } + + /// + /// 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.AnthropicThinkingConfig? 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.AnthropicThinkingConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicThinkingConfig; + } + + /// + /// 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.AnthropicThinkingConfig.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicThinkingConfig.g.cs new file mode 100644 index 0000000..8c80106 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicThinkingConfig.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicThinkingConfig + { + /// + /// Default Value: true + /// + [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] + public bool? Enabled { 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: true + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AnthropicThinkingConfig( + bool? enabled) + { + this.Enabled = enabled; + } + + /// + /// Initializes a new instance of the class. + /// + public AnthropicThinkingConfig() + { + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequest.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequest.Json.g.cs new file mode 100644 index 0000000..95ff2b9 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicTokenCountRequest + { + /// + /// 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.AnthropicTokenCountRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicTokenCountRequest), + jsonSerializerContext) as global::DeepInfra.AnthropicTokenCountRequest; + } + + /// + /// 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.AnthropicTokenCountRequest? 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.AnthropicTokenCountRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicTokenCountRequest; + } + + /// + /// 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.AnthropicTokenCountRequest.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequest.g.cs new file mode 100644 index 0000000..86d61e6 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequest.g.cs @@ -0,0 +1,93 @@ + +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicTokenCountRequest + { + /// + /// + /// + [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("messages")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Messages { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("system")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::DeepInfra.JsonConverters.AnyOfJsonConverter>))] + public global::DeepInfra.AnyOf>? System { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList? Tools { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("thinking")] + public global::DeepInfra.AnthropicThinkingConfig? Thinking { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_choice")] + public object? ToolChoice { 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. + /// + /// + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AnthropicTokenCountRequest( + string model, + global::System.Collections.Generic.IList messages, + global::DeepInfra.AnyOf>? system, + global::System.Collections.Generic.IList? tools, + global::DeepInfra.AnthropicThinkingConfig? thinking, + object? toolChoice) + { + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages)); + this.System = system; + this.Tools = tools; + this.Thinking = thinking; + this.ToolChoice = toolChoice; + } + + /// + /// Initializes a new instance of the class. + /// + public AnthropicTokenCountRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestMessage.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestMessage.Json.g.cs new file mode 100644 index 0000000..c83deb0 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestMessage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicTokenCountRequestMessage + { + /// + /// 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.AnthropicTokenCountRequestMessage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicTokenCountRequestMessage), + jsonSerializerContext) as global::DeepInfra.AnthropicTokenCountRequestMessage; + } + + /// + /// 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.AnthropicTokenCountRequestMessage? 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.AnthropicTokenCountRequestMessage), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicTokenCountRequestMessage; + } + + /// + /// 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.AnthropicTokenCountRequestMessage.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestMessage.g.cs new file mode 100644 index 0000000..d4e3cc5 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestMessage.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicTokenCountRequestMessage + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestToolChoice.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestToolChoice.Json.g.cs new file mode 100644 index 0000000..a469061 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestToolChoice.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicTokenCountRequestToolChoice + { + /// + /// 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.AnthropicTokenCountRequestToolChoice? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicTokenCountRequestToolChoice), + jsonSerializerContext) as global::DeepInfra.AnthropicTokenCountRequestToolChoice; + } + + /// + /// 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.AnthropicTokenCountRequestToolChoice? 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.AnthropicTokenCountRequestToolChoice), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicTokenCountRequestToolChoice; + } + + /// + /// 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.AnthropicTokenCountRequestToolChoice.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestToolChoice.g.cs new file mode 100644 index 0000000..60e1a7f --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTokenCountRequestToolChoice.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicTokenCountRequestToolChoice + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTool.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTool.Json.g.cs new file mode 100644 index 0000000..f2e2029 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTool.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicTool + { + /// + /// 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.AnthropicTool? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicTool), + jsonSerializerContext) as global::DeepInfra.AnthropicTool; + } + + /// + /// 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.AnthropicTool? 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.AnthropicTool), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicTool; + } + + /// + /// 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.AnthropicTool.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTool.g.cs new file mode 100644 index 0000000..dcec00a --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicTool.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicTool + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_schema")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object InputSchema { 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. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AnthropicTool( + string name, + object inputSchema, + string? description) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.InputSchema = inputSchema ?? throw new global::System.ArgumentNullException(nameof(inputSchema)); + this.Description = description; + } + + /// + /// Initializes a new instance of the class. + /// + public AnthropicTool() + { + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicToolInputSchema.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicToolInputSchema.Json.g.cs new file mode 100644 index 0000000..187c553 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicToolInputSchema.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AnthropicToolInputSchema + { + /// + /// 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.AnthropicToolInputSchema? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnthropicToolInputSchema), + jsonSerializerContext) as global::DeepInfra.AnthropicToolInputSchema; + } + + /// + /// 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.AnthropicToolInputSchema? 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.AnthropicToolInputSchema), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnthropicToolInputSchema; + } + + /// + /// 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.AnthropicToolInputSchema.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicToolInputSchema.g.cs new file mode 100644 index 0000000..9ab9061 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AnthropicToolInputSchema.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace DeepInfra +{ + /// + /// + /// + public sealed partial class AnthropicToolInputSchema + { + + /// + /// 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(); + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/openapi.yaml b/src/libs/DeepInfra/openapi.yaml index 838118c..f2a6b46 100644 --- a/src/libs/DeepInfra/openapi.yaml +++ b/src/libs/DeepInfra/openapi.yaml @@ -1972,6 +1972,100 @@ paths: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [ ] + /anthropic/v1/messages: + post: + summary: Anthropic Messages + operationId: anthropic_messages_anthropic_v1_messages_post + parameters: + - name: authorization + in: header + schema: + title: Authorization + type: string + nullable: true + - name: x-api-key + in: header + schema: + title: X-Api-Key + type: string + nullable: true + - name: anthropic-version + in: header + schema: + title: Anthropic-Version + type: string + nullable: true + - name: anthropic-beta + in: header + schema: + title: Anthropic-Beta + type: string + nullable: true + - name: x-deepinfra-source + in: header + schema: + title: X-Deepinfra-Source + type: string + nullable: true + - name: user-agent + in: header + schema: + title: User-Agent + type: string + nullable: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AnthropicMessagesIn' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + /anthropic/v1/messages/count_tokens: + post: + summary: Anthropic Messages Count Tokens + operationId: anthropic_messages_count_tokens_anthropic_v1_messages_count_tokens_post + parameters: + - name: authorization + in: header + schema: + title: Authorization + type: string + nullable: true + - name: x-api-key + in: header + schema: + title: X-Api-Key + type: string + nullable: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AnthropicTokenCountRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: { } + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' /v1/embeddings: post: summary: Openai Embeddings @@ -4769,6 +4863,148 @@ components: type: title: Error Type type: string + AnthropicMessagesIn: + title: AnthropicMessagesIn + required: + - model + - messages + type: object + properties: + model: + title: Model + type: string + max_tokens: + title: Max Tokens + type: integer + nullable: true + messages: + title: Messages + type: array + items: + type: object + system: + title: System + anyOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/AnthropicSystemContent' + nullable: true + stop_sequences: + title: Stop Sequences + type: array + items: + type: string + nullable: true + stream: + title: Stream + type: boolean + default: false + nullable: true + temperature: + title: Temperature + type: number + default: 1 + nullable: true + top_p: + title: Top P + type: number + nullable: true + top_k: + title: Top K + type: integer + nullable: true + metadata: + title: Metadata + type: object + nullable: true + tools: + title: Tools + type: array + items: + $ref: '#/components/schemas/AnthropicTool' + nullable: true + tool_choice: + title: Tool Choice + type: object + nullable: true + thinking: + $ref: '#/components/schemas/AnthropicThinkingConfig' + AnthropicSystemContent: + title: AnthropicSystemContent + required: + - type + - text + type: object + properties: + type: + title: Type + enum: + - text + type: string + text: + title: Text + type: string + AnthropicThinkingConfig: + title: AnthropicThinkingConfig + type: object + properties: + enabled: + title: Enabled + type: boolean + default: true + AnthropicTokenCountRequest: + title: AnthropicTokenCountRequest + required: + - model + - messages + type: object + properties: + model: + title: Model + type: string + messages: + title: Messages + type: array + items: + type: object + system: + title: System + anyOf: + - type: string + - type: array + items: + $ref: '#/components/schemas/AnthropicSystemContent' + nullable: true + tools: + title: Tools + type: array + items: + $ref: '#/components/schemas/AnthropicTool' + nullable: true + thinking: + $ref: '#/components/schemas/AnthropicThinkingConfig' + tool_choice: + title: Tool Choice + type: object + nullable: true + AnthropicTool: + title: AnthropicTool + required: + - name + - input_schema + type: object + properties: + name: + title: Name + type: string + description: + title: Description + type: string + nullable: true + input_schema: + title: Input Schema + type: object ApiToken: title: ApiToken required: