From 2ef616d111deb7c180e7f04e8c7063b55b15249a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Nov 2024 12:43:23 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- src/libs/AI21/Generated/AI21.Ai21Api.g.cs | 18 - ...nClient.V1J2GrandeCustomModelComplete.g.cs | 292 --------- ...21.CompletionClient.V1J2JumboComplete.g.cs | 292 --------- ...onClient.V1J2LargeCustomModelComplete.g.cs | 292 --------- ...onClient.V1J2LightCustomModelComplete.g.cs | 292 --------- ...tionClient.V1J2MidCustomModelComplete.g.cs | 292 --------- ...21.CompletionClient.V1J2UltraComplete.g.cs | 292 --------- .../AI21/Generated/AI21.CompletionClient.g.cs | 86 --- ...ustomModelsClient.V1CreateCustomModel.g.cs | 230 ------- ...ustomModelsClient.V1DeleteCustomModel.g.cs | 183 ------ ...1.CustomModelsClient.V1GetCustomModel.g.cs | 183 ------ ....CustomModelsClient.V1GetCustomModels.g.cs | 186 ------ ...ustomModelsClient.V1UpdateCustomModel.g.cs | 225 ------- .../Generated/AI21.CustomModelsClient.g.cs | 86 --- src/libs/AI21/Generated/AI21.IAi21Api.g.cs | 10 - ...nClient.V1J2GrandeCustomModelComplete.g.cs | 87 --- ...1.ICompletionClient.V1J2JumboComplete.g.cs | 87 --- ...onClient.V1J2LargeCustomModelComplete.g.cs | 87 --- ...onClient.V1J2LightCustomModelComplete.g.cs | 87 --- ...tionClient.V1J2MidCustomModelComplete.g.cs | 87 --- ...1.ICompletionClient.V1J2UltraComplete.g.cs | 87 --- .../Generated/AI21.ICompletionClient.g.cs | 40 -- ...ustomModelsClient.V1CreateCustomModel.g.cs | 45 -- ...ustomModelsClient.V1DeleteCustomModel.g.cs | 21 - ....ICustomModelsClient.V1GetCustomModel.g.cs | 21 - ...ICustomModelsClient.V1GetCustomModels.g.cs | 23 - ...ustomModelsClient.V1UpdateCustomModel.g.cs | 39 -- .../Generated/AI21.ICustomModelsClient.g.cs | 40 -- .../AI21.Models.CompletionBody.Json.g.cs | 92 --- .../Generated/AI21.Models.CompletionBody.g.cs | 173 ------ ...1.Models.CompletionBodyLogitBias.Json.g.cs | 92 --- .../AI21.Models.CompletionBodyLogitBias.g.cs | 27 - .../AI21.Models.CustomModelInput.Json.g.cs | 92 --- .../AI21.Models.CustomModelInput.g.cs | 83 --- .../AI21.Models.CustomModelType.g.cs | 75 --- ...I21.Models.CustomModelUpdateBody.Json.g.cs | 92 --- .../AI21.Models.CustomModelUpdateBody.g.cs | 41 -- .../Generated/AI21.Models.Penalty.Json.g.cs | 92 --- .../AI21/Generated/AI21.Models.Penalty.g.cs | 97 --- ...dels.V1CreateCustomModelResponse.Json.g.cs | 92 --- ...21.Models.V1CreateCustomModelResponse.g.cs | 27 - ...dels.V1DeleteCustomModelResponse.Json.g.cs | 92 --- ...21.Models.V1DeleteCustomModelResponse.g.cs | 27 - ....Models.V1GetCustomModelResponse.Json.g.cs | 92 --- .../AI21.Models.V1GetCustomModelResponse.g.cs | 27 - ...Models.V1GetCustomModelsResponse.Json.g.cs | 92 --- ...AI21.Models.V1GetCustomModelsResponse.g.cs | 27 - ...randeCustomModelCompleteResponse.Json.g.cs | 92 --- ...V1J2GrandeCustomModelCompleteResponse.g.cs | 27 - ...Models.V1J2JumboCompleteResponse.Json.g.cs | 92 --- ...AI21.Models.V1J2JumboCompleteResponse.g.cs | 27 - ...LargeCustomModelCompleteResponse.Json.g.cs | 92 --- ....V1J2LargeCustomModelCompleteResponse.g.cs | 27 - ...LightCustomModelCompleteResponse.Json.g.cs | 92 --- ....V1J2LightCustomModelCompleteResponse.g.cs | 27 - ...J2MidCustomModelCompleteResponse.Json.g.cs | 92 --- ...ls.V1J2MidCustomModelCompleteResponse.g.cs | 27 - ...Models.V1J2UltraCompleteResponse.Json.g.cs | 92 --- ...AI21.Models.V1J2UltraCompleteResponse.g.cs | 27 - ...dels.V1UpdateCustomModelResponse.Json.g.cs | 92 --- ...21.Models.V1UpdateCustomModelResponse.g.cs | 27 - .../JsonConverters.CustomModelType.g.cs | 49 -- ...sonConverters.CustomModelTypeNullable.g.cs | 56 -- .../AI21/Generated/JsonSerializerContext.g.cs | 3 +- .../Generated/JsonSerializerContextTypes.g.cs | 90 ++- src/libs/AI21/openapi.yaml | 566 ------------------ 66 files changed, 36 insertions(+), 6703 deletions(-) delete mode 100644 src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeCustomModelComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeCustomModelComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightCustomModelComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidCustomModelComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CompletionClient.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CustomModelsClient.V1CreateCustomModel.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CustomModelsClient.V1DeleteCustomModel.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModel.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModels.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CustomModelsClient.V1UpdateCustomModel.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.CustomModelsClient.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICompletionClient.V1J2GrandeCustomModelComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICompletionClient.V1J2JumboComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LargeCustomModelComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LightCustomModelComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICompletionClient.V1J2MidCustomModelComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICompletionClient.V1J2UltraComplete.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICompletionClient.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICustomModelsClient.V1CreateCustomModel.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICustomModelsClient.V1DeleteCustomModel.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICustomModelsClient.V1GetCustomModel.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICustomModelsClient.V1GetCustomModels.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICustomModelsClient.V1UpdateCustomModel.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.ICustomModelsClient.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.CompletionBody.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.CompletionBody.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.CompletionBodyLogitBias.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.CompletionBodyLogitBias.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.CustomModelInput.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.CustomModelInput.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.CustomModelType.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.CustomModelUpdateBody.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.CustomModelUpdateBody.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.Penalty.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.Penalty.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1CreateCustomModelResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1CreateCustomModelResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1DeleteCustomModelResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1DeleteCustomModelResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1GetCustomModelResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1GetCustomModelResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1GetCustomModelsResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1GetCustomModelsResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2GrandeCustomModelCompleteResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2GrandeCustomModelCompleteResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2LargeCustomModelCompleteResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2LargeCustomModelCompleteResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2LightCustomModelCompleteResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2LightCustomModelCompleteResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2MidCustomModelCompleteResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2MidCustomModelCompleteResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1UpdateCustomModelResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.V1UpdateCustomModelResponse.g.cs delete mode 100644 src/libs/AI21/Generated/JsonConverters.CustomModelType.g.cs delete mode 100644 src/libs/AI21/Generated/JsonConverters.CustomModelTypeNullable.g.cs diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.g.cs index 9edc911..b8232ba 100644 --- a/src/libs/AI21/Generated/AI21.Ai21Api.g.cs +++ b/src/libs/AI21/Generated/AI21.Ai21Api.g.cs @@ -46,24 +46,6 @@ public sealed partial class Ai21Api : global::AI21.IAi21Api, global::System.IDis JsonSerializerContext = JsonSerializerContext, }; - /// - /// - /// - public CompletionClient Completion => new CompletionClient(HttpClient, authorizations: Authorizations) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public CustomModelsClient CustomModels => new CustomModelsClient(HttpClient, authorizations: Authorizations) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - /// /// /// diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeCustomModelComplete.g.cs deleted file mode 100644 index 7924e82..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeCustomModelComplete.g.cs +++ /dev/null @@ -1,292 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2GrandeCustomModelCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string customModelName, - ref string? customModelType, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2GrandeCustomModelCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string customModelName, - string? customModelType, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2GrandeCustomModelCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2GrandeCustomModelCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Custom j2-grande complete - /// - /// - /// - /// Default Value: j2-grande - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2GrandeCustomModelCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2GrandeCustomModelCompleteArguments( - httpClient: HttpClient, - customModelName: ref customModelName, - customModelType: ref customModelType, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: $"/studio/v1/j2-grande/{customModelName}/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("custom_model_type", customModelType) - .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - 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); - PrepareV1J2GrandeCustomModelCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - 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); - ProcessV1J2GrandeCustomModelCompleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Validation Error - if ((int)__response.StatusCode == 422) - { - string? __content_422 = null; - global::AI21.HTTPValidationError? __value_422 = null; - if (ReadResponseAsString) - { - __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); - } - else - { - var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); - } - - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessV1J2GrandeCustomModelCompleteResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - return __content; - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - return __content; - } - } - - /// - /// Custom j2-grande complete - /// - /// - /// - /// Default Value: j2-grande - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2GrandeCustomModelCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.CompletionBody - { - Prompt = prompt, - NumResults = numResults, - MaxTokens = maxTokens, - MinTokens = minTokens, - Temperature = temperature, - TopP = topP, - MinP = minP, - StopSequences = stopSequences, - TopKReturn = topKReturn, - LogitBias = logitBias, - FrequencyPenalty = frequencyPenalty, - PresencePenalty = presencePenalty, - CountPenalty = countPenalty, - Epoch = epoch, - }; - - return await V1J2GrandeCustomModelCompleteAsync( - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete.g.cs deleted file mode 100644 index f8169ad..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete.g.cs +++ /dev/null @@ -1,292 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2JumboCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string customModelName, - ref string? customModelType, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2JumboCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string customModelName, - string? customModelType, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2JumboCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2JumboCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Custom j2-jumbo complete - /// - /// - /// - /// Default Value: j2-jumbo - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2JumboCompleteArguments( - httpClient: HttpClient, - customModelName: ref customModelName, - customModelType: ref customModelType, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: $"/studio/v1/j2-jumbo/{customModelName}/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("custom_model_type", customModelType) - .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - 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); - PrepareV1J2JumboCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - 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); - ProcessV1J2JumboCompleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Validation Error - if ((int)__response.StatusCode == 422) - { - string? __content_422 = null; - global::AI21.HTTPValidationError? __value_422 = null; - if (ReadResponseAsString) - { - __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); - } - else - { - var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); - } - - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessV1J2JumboCompleteResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - return __content; - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - return __content; - } - } - - /// - /// Custom j2-jumbo complete - /// - /// - /// - /// Default Value: j2-jumbo - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.CompletionBody - { - Prompt = prompt, - NumResults = numResults, - MaxTokens = maxTokens, - MinTokens = minTokens, - Temperature = temperature, - TopP = topP, - MinP = minP, - StopSequences = stopSequences, - TopKReturn = topKReturn, - LogitBias = logitBias, - FrequencyPenalty = frequencyPenalty, - PresencePenalty = presencePenalty, - CountPenalty = countPenalty, - Epoch = epoch, - }; - - return await V1J2JumboCompleteAsync( - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeCustomModelComplete.g.cs deleted file mode 100644 index 8368608..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeCustomModelComplete.g.cs +++ /dev/null @@ -1,292 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2LargeCustomModelCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string customModelName, - ref string? customModelType, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2LargeCustomModelCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string customModelName, - string? customModelType, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2LargeCustomModelCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2LargeCustomModelCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Custom j2-large complete - /// - /// - /// - /// Default Value: j2-large - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2LargeCustomModelCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2LargeCustomModelCompleteArguments( - httpClient: HttpClient, - customModelName: ref customModelName, - customModelType: ref customModelType, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: $"/studio/v1/j2-large/{customModelName}/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("custom_model_type", customModelType) - .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - 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); - PrepareV1J2LargeCustomModelCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - 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); - ProcessV1J2LargeCustomModelCompleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Validation Error - if ((int)__response.StatusCode == 422) - { - string? __content_422 = null; - global::AI21.HTTPValidationError? __value_422 = null; - if (ReadResponseAsString) - { - __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); - } - else - { - var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); - } - - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessV1J2LargeCustomModelCompleteResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - return __content; - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - return __content; - } - } - - /// - /// Custom j2-large complete - /// - /// - /// - /// Default Value: j2-large - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2LargeCustomModelCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.CompletionBody - { - Prompt = prompt, - NumResults = numResults, - MaxTokens = maxTokens, - MinTokens = minTokens, - Temperature = temperature, - TopP = topP, - MinP = minP, - StopSequences = stopSequences, - TopKReturn = topKReturn, - LogitBias = logitBias, - FrequencyPenalty = frequencyPenalty, - PresencePenalty = presencePenalty, - CountPenalty = countPenalty, - Epoch = epoch, - }; - - return await V1J2LargeCustomModelCompleteAsync( - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightCustomModelComplete.g.cs deleted file mode 100644 index cf20635..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightCustomModelComplete.g.cs +++ /dev/null @@ -1,292 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2LightCustomModelCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string customModelName, - ref string? customModelType, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2LightCustomModelCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string customModelName, - string? customModelType, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2LightCustomModelCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2LightCustomModelCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Custom j2-light complete - /// - /// - /// - /// Default Value: j2-light - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2LightCustomModelCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2LightCustomModelCompleteArguments( - httpClient: HttpClient, - customModelName: ref customModelName, - customModelType: ref customModelType, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: $"/studio/v1/j2-light/{customModelName}/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("custom_model_type", customModelType) - .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - 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); - PrepareV1J2LightCustomModelCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - 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); - ProcessV1J2LightCustomModelCompleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Validation Error - if ((int)__response.StatusCode == 422) - { - string? __content_422 = null; - global::AI21.HTTPValidationError? __value_422 = null; - if (ReadResponseAsString) - { - __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); - } - else - { - var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); - } - - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessV1J2LightCustomModelCompleteResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - return __content; - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - return __content; - } - } - - /// - /// Custom j2-light complete - /// - /// - /// - /// Default Value: j2-light - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2LightCustomModelCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.CompletionBody - { - Prompt = prompt, - NumResults = numResults, - MaxTokens = maxTokens, - MinTokens = minTokens, - Temperature = temperature, - TopP = topP, - MinP = minP, - StopSequences = stopSequences, - TopKReturn = topKReturn, - LogitBias = logitBias, - FrequencyPenalty = frequencyPenalty, - PresencePenalty = presencePenalty, - CountPenalty = countPenalty, - Epoch = epoch, - }; - - return await V1J2LightCustomModelCompleteAsync( - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidCustomModelComplete.g.cs deleted file mode 100644 index 798d9aa..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidCustomModelComplete.g.cs +++ /dev/null @@ -1,292 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2MidCustomModelCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string customModelName, - ref string? customModelType, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2MidCustomModelCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string customModelName, - string? customModelType, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2MidCustomModelCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2MidCustomModelCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Custom j2-mid complete - /// - /// - /// - /// Default Value: j2-mid - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2MidCustomModelCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2MidCustomModelCompleteArguments( - httpClient: HttpClient, - customModelName: ref customModelName, - customModelType: ref customModelType, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: $"/studio/v1/j2-mid/{customModelName}/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("custom_model_type", customModelType) - .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - 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); - PrepareV1J2MidCustomModelCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - 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); - ProcessV1J2MidCustomModelCompleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Validation Error - if ((int)__response.StatusCode == 422) - { - string? __content_422 = null; - global::AI21.HTTPValidationError? __value_422 = null; - if (ReadResponseAsString) - { - __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); - } - else - { - var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); - } - - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessV1J2MidCustomModelCompleteResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - return __content; - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - return __content; - } - } - - /// - /// Custom j2-mid complete - /// - /// - /// - /// Default Value: j2-mid - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2MidCustomModelCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.CompletionBody - { - Prompt = prompt, - NumResults = numResults, - MaxTokens = maxTokens, - MinTokens = minTokens, - Temperature = temperature, - TopP = topP, - MinP = minP, - StopSequences = stopSequences, - TopKReturn = topKReturn, - LogitBias = logitBias, - FrequencyPenalty = frequencyPenalty, - PresencePenalty = presencePenalty, - CountPenalty = countPenalty, - Epoch = epoch, - }; - - return await V1J2MidCustomModelCompleteAsync( - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete.g.cs deleted file mode 100644 index 8de1455..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete.g.cs +++ /dev/null @@ -1,292 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2UltraCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string customModelName, - ref string? customModelType, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2UltraCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string customModelName, - string? customModelType, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2UltraCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2UltraCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Custom j2-ultra complete - /// - /// - /// - /// Default Value: j2-ultra - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2UltraCompleteArguments( - httpClient: HttpClient, - customModelName: ref customModelName, - customModelType: ref customModelType, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: $"/studio/v1/j2-ultra/{customModelName}/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("custom_model_type", customModelType) - .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - 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); - PrepareV1J2UltraCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - 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); - ProcessV1J2UltraCompleteResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Validation Error - if ((int)__response.StatusCode == 422) - { - string? __content_422 = null; - global::AI21.HTTPValidationError? __value_422 = null; - if (ReadResponseAsString) - { - __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); - } - else - { - var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); - } - - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessV1J2UltraCompleteResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - return __content; - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - return __content; - } - } - - /// - /// Custom j2-ultra complete - /// - /// - /// - /// Default Value: j2-ultra - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.CompletionBody - { - Prompt = prompt, - NumResults = numResults, - MaxTokens = maxTokens, - MinTokens = minTokens, - Temperature = temperature, - TopP = topP, - MinP = minP, - StopSequences = stopSequences, - TopKReturn = topKReturn, - LogitBias = logitBias, - FrequencyPenalty = frequencyPenalty, - PresencePenalty = presencePenalty, - CountPenalty = countPenalty, - Epoch = epoch, - }; - - return await V1J2UltraCompleteAsync( - customModelName: customModelName, - customModelType: customModelType, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.g.cs deleted file mode 100644 index 795e67b..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.g.cs +++ /dev/null @@ -1,86 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// If no httpClient is provided, a new one will be created.
- /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. - ///
- public sealed partial class CompletionClient : global::AI21.ICompletionClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.ai21.com/"; - - private bool _disposeHttpClient = true; - - /// - public global::System.Net.Http.HttpClient HttpClient { get; } - - /// - public System.Uri? BaseUri => HttpClient.BaseAddress; - - /// - public global::System.Collections.Generic.List Authorizations { get; } - - /// - public bool ReadResponseAsString { get; set; } -#if DEBUG - = true; -#endif - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::AI21.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the CompletionClient. - /// If no httpClient is provided, a new one will be created. - /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. - /// - /// The HttpClient instance. If not provided, a new one will be created. - /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. - /// The authorizations to use for the requests. - /// Dispose the HttpClient when the instance is disposed. True by default. - public CompletionClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - bool disposeHttpClient = true) - { - HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); - Authorizations = authorizations ?? new global::System.Collections.Generic.List(); - _disposeHttpClient = disposeHttpClient; - - Initialized(HttpClient); - } - - /// - public void Dispose() - { - if (_disposeHttpClient) - { - HttpClient.Dispose(); - } - } - - partial void Initialized( - global::System.Net.Http.HttpClient client); - partial void PrepareArguments( - global::System.Net.Http.HttpClient client); - partial void PrepareRequest( - global::System.Net.Http.HttpClient client, - global::System.Net.Http.HttpRequestMessage request); - partial void ProcessResponse( - global::System.Net.Http.HttpClient client, - global::System.Net.Http.HttpResponseMessage response); - partial void ProcessResponseContent( - global::System.Net.Http.HttpClient client, - global::System.Net.Http.HttpResponseMessage response, - ref string content); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1CreateCustomModel.g.cs b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1CreateCustomModel.g.cs deleted file mode 100644 index 5162c00..0000000 --- a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1CreateCustomModel.g.cs +++ /dev/null @@ -1,230 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CustomModelsClient - { - partial void PrepareV1CreateCustomModelArguments( - global::System.Net.Http.HttpClient httpClient, - ref int? requestStartTime, - global::AI21.CustomModelInput request); - partial void PrepareV1CreateCustomModelRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - int? requestStartTime, - global::AI21.CustomModelInput request); - partial void ProcessV1CreateCustomModelResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1CreateCustomModelResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create Custom Model - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1CreateCustomModelAsync( - global::AI21.CustomModelInput request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1CreateCustomModelArguments( - httpClient: HttpClient, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/custom-model", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - 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); - PrepareV1CreateCustomModelRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - requestStartTime: requestStartTime, - 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); - ProcessV1CreateCustomModelResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Validation Error - if ((int)__response.StatusCode == 422) - { - string? __content_422 = null; - global::AI21.HTTPValidationError? __value_422 = null; - if (ReadResponseAsString) - { - __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); - } - else - { - var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); - } - - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessV1CreateCustomModelResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - return __content; - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - return __content; - } - } - - /// - /// Create Custom Model - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// An enumeration. - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1CreateCustomModelAsync( - global::AI21.CustomModelType modelType, - string datasetId, - string modelName, - int? requestStartTime = default, - double? learningRate = default, - int? numEpochs = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.CustomModelInput - { - ModelType = modelType, - LearningRate = learningRate, - NumEpochs = numEpochs, - DatasetId = datasetId, - ModelName = modelName, - }; - - return await V1CreateCustomModelAsync( - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1DeleteCustomModel.g.cs b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1DeleteCustomModel.g.cs deleted file mode 100644 index 3c9d456..0000000 --- a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1DeleteCustomModel.g.cs +++ /dev/null @@ -1,183 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CustomModelsClient - { - partial void PrepareV1DeleteCustomModelArguments( - global::System.Net.Http.HttpClient httpClient, - ref string modelPid, - ref int? requestStartTime); - partial void PrepareV1DeleteCustomModelRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string modelPid, - int? requestStartTime); - partial void ProcessV1DeleteCustomModelResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1DeleteCustomModelResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Delete Model - /// - /// - /// - /// Default Value: 1730898900272 - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1DeleteCustomModelAsync( - string modelPid, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareV1DeleteCustomModelArguments( - httpClient: HttpClient, - modelPid: ref modelPid, - requestStartTime: ref requestStartTime); - - var __pathBuilder = new PathBuilder( - path: $"/studio/v1/custom-model/{modelPid}", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Delete, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareV1DeleteCustomModelRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - modelPid: modelPid, - requestStartTime: requestStartTime); - - using var __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: cancellationToken).ConfigureAwait(false); - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessV1DeleteCustomModelResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Validation Error - if ((int)__response.StatusCode == 422) - { - string? __content_422 = null; - global::AI21.HTTPValidationError? __value_422 = null; - if (ReadResponseAsString) - { - __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); - } - else - { - var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); - } - - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessV1DeleteCustomModelResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - return __content; - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - return __content; - } - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModel.g.cs b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModel.g.cs deleted file mode 100644 index fa414a6..0000000 --- a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModel.g.cs +++ /dev/null @@ -1,183 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CustomModelsClient - { - partial void PrepareV1GetCustomModelArguments( - global::System.Net.Http.HttpClient httpClient, - ref string customModelPid, - ref int? requestStartTime); - partial void PrepareV1GetCustomModelRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string customModelPid, - int? requestStartTime); - partial void ProcessV1GetCustomModelResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1GetCustomModelResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get Custom Model - /// - /// - /// - /// Default Value: 1730898900272 - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1GetCustomModelAsync( - string customModelPid, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareV1GetCustomModelArguments( - httpClient: HttpClient, - customModelPid: ref customModelPid, - requestStartTime: ref requestStartTime); - - var __pathBuilder = new PathBuilder( - path: $"/studio/v1/custom-model/{customModelPid}", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareV1GetCustomModelRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - customModelPid: customModelPid, - requestStartTime: requestStartTime); - - using var __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: cancellationToken).ConfigureAwait(false); - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessV1GetCustomModelResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Validation Error - if ((int)__response.StatusCode == 422) - { - string? __content_422 = null; - global::AI21.HTTPValidationError? __value_422 = null; - if (ReadResponseAsString) - { - __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); - } - else - { - var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); - } - - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessV1GetCustomModelResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - return __content; - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - return __content; - } - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModels.g.cs b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModels.g.cs deleted file mode 100644 index ac3c8a6..0000000 --- a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1GetCustomModels.g.cs +++ /dev/null @@ -1,186 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CustomModelsClient - { - partial void PrepareV1GetCustomModelsArguments( - global::System.Net.Http.HttpClient httpClient, - ref bool? includeMetadata, - ref int? requestStartTime); - partial void PrepareV1GetCustomModelsRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - bool? includeMetadata, - int? requestStartTime); - partial void ProcessV1GetCustomModelsResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1GetCustomModelsResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Get Custom Models List - /// - /// - /// Default Value: false - /// - /// - /// Default Value: 1730898900272 - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1GetCustomModelsAsync( - bool? includeMetadata = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareV1GetCustomModelsArguments( - httpClient: HttpClient, - includeMetadata: ref includeMetadata, - requestStartTime: ref requestStartTime); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/custom-model", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("includeMetadata", includeMetadata?.ToString()) - .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Get, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareV1GetCustomModelsRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - includeMetadata: includeMetadata, - requestStartTime: requestStartTime); - - using var __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: cancellationToken).ConfigureAwait(false); - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessV1GetCustomModelsResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Validation Error - if ((int)__response.StatusCode == 422) - { - string? __content_422 = null; - global::AI21.HTTPValidationError? __value_422 = null; - if (ReadResponseAsString) - { - __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); - } - else - { - var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); - } - - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessV1GetCustomModelsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - return __content; - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - return __content; - } - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1UpdateCustomModel.g.cs b/src/libs/AI21/Generated/AI21.CustomModelsClient.V1UpdateCustomModel.g.cs deleted file mode 100644 index 9e84cd8..0000000 --- a/src/libs/AI21/Generated/AI21.CustomModelsClient.V1UpdateCustomModel.g.cs +++ /dev/null @@ -1,225 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CustomModelsClient - { - partial void PrepareV1UpdateCustomModelArguments( - global::System.Net.Http.HttpClient httpClient, - ref string customModelPid, - ref int? requestStartTime, - global::AI21.CustomModelUpdateBody request); - partial void PrepareV1UpdateCustomModelRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string customModelPid, - int? requestStartTime, - global::AI21.CustomModelUpdateBody request); - partial void ProcessV1UpdateCustomModelResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1UpdateCustomModelResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update Model - /// - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1UpdateCustomModelAsync( - string customModelPid, - global::AI21.CustomModelUpdateBody request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1UpdateCustomModelArguments( - httpClient: HttpClient, - customModelPid: ref customModelPid, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: $"/studio/v1/custom-model/{customModelPid}", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) - ; - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Put, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - - foreach (var __authorization in Authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - 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); - PrepareV1UpdateCustomModelRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - customModelPid: customModelPid, - requestStartTime: requestStartTime, - 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); - ProcessV1UpdateCustomModelResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Validation Error - if ((int)__response.StatusCode == 422) - { - string? __content_422 = null; - global::AI21.HTTPValidationError? __value_422 = null; - if (ReadResponseAsString) - { - __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); - } - else - { - var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); - } - - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - if (ReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessV1UpdateCustomModelResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - return __content; - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - } - catch (global::System.Net.Http.HttpRequestException __ex) - { - throw new global::AI21.ApiException( - message: __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - return __content; - } - } - - /// - /// Update Model - /// - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1UpdateCustomModelAsync( - string customModelPid, - int? requestStartTime = default, - int? defaultEpoch = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.CustomModelUpdateBody - { - DefaultEpoch = defaultEpoch, - }; - - return await V1UpdateCustomModelAsync( - customModelPid: customModelPid, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CustomModelsClient.g.cs b/src/libs/AI21/Generated/AI21.CustomModelsClient.g.cs deleted file mode 100644 index 6f59aa0..0000000 --- a/src/libs/AI21/Generated/AI21.CustomModelsClient.g.cs +++ /dev/null @@ -1,86 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// If no httpClient is provided, a new one will be created.
- /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. - ///
- public sealed partial class CustomModelsClient : global::AI21.ICustomModelsClient, global::System.IDisposable - { - /// - /// - /// - public const string DefaultBaseUrl = "https://api.ai21.com/"; - - private bool _disposeHttpClient = true; - - /// - public global::System.Net.Http.HttpClient HttpClient { get; } - - /// - public System.Uri? BaseUri => HttpClient.BaseAddress; - - /// - public global::System.Collections.Generic.List Authorizations { get; } - - /// - public bool ReadResponseAsString { get; set; } -#if DEBUG - = true; -#endif - /// - /// - /// - public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::AI21.SourceGenerationContext.Default; - - - /// - /// Creates a new instance of the CustomModelsClient. - /// If no httpClient is provided, a new one will be created. - /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. - /// - /// The HttpClient instance. If not provided, a new one will be created. - /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. - /// The authorizations to use for the requests. - /// Dispose the HttpClient when the instance is disposed. True by default. - public CustomModelsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - bool disposeHttpClient = true) - { - HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); - Authorizations = authorizations ?? new global::System.Collections.Generic.List(); - _disposeHttpClient = disposeHttpClient; - - Initialized(HttpClient); - } - - /// - public void Dispose() - { - if (_disposeHttpClient) - { - HttpClient.Dispose(); - } - } - - partial void Initialized( - global::System.Net.Http.HttpClient client); - partial void PrepareArguments( - global::System.Net.Http.HttpClient client); - partial void PrepareRequest( - global::System.Net.Http.HttpClient client, - global::System.Net.Http.HttpRequestMessage request); - partial void ProcessResponse( - global::System.Net.Http.HttpClient client, - global::System.Net.Http.HttpResponseMessage response); - partial void ProcessResponseContent( - global::System.Net.Http.HttpClient client, - global::System.Net.Http.HttpResponseMessage response, - ref string content); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IAi21Api.g.cs b/src/libs/AI21/Generated/AI21.IAi21Api.g.cs index 12e900b..fa03c17 100644 --- a/src/libs/AI21/Generated/AI21.IAi21Api.g.cs +++ b/src/libs/AI21/Generated/AI21.IAi21Api.g.cs @@ -42,16 +42,6 @@ public partial interface IAi21Api : global::System.IDisposable /// public JambaCompleteClient JambaComplete { get; } - /// - /// - /// - public CompletionClient Completion { get; } - - /// - /// - /// - public CustomModelsClient CustomModels { get; } - /// /// /// diff --git a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2GrandeCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2GrandeCustomModelComplete.g.cs deleted file mode 100644 index a61d51b..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2GrandeCustomModelComplete.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// Custom j2-grande complete - /// - /// - /// - /// Default Value: j2-grande - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2GrandeCustomModelCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Custom j2-grande complete - /// - /// - /// - /// Default Value: j2-grande - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2GrandeCustomModelCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2JumboComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2JumboComplete.g.cs deleted file mode 100644 index 0a8989f..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2JumboComplete.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// Custom j2-jumbo complete - /// - /// - /// - /// Default Value: j2-jumbo - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Custom j2-jumbo complete - /// - /// - /// - /// Default Value: j2-jumbo - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LargeCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LargeCustomModelComplete.g.cs deleted file mode 100644 index 5d62057..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LargeCustomModelComplete.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// Custom j2-large complete - /// - /// - /// - /// Default Value: j2-large - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2LargeCustomModelCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Custom j2-large complete - /// - /// - /// - /// Default Value: j2-large - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2LargeCustomModelCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LightCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LightCustomModelComplete.g.cs deleted file mode 100644 index 55d079b..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LightCustomModelComplete.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// Custom j2-light complete - /// - /// - /// - /// Default Value: j2-light - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2LightCustomModelCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Custom j2-light complete - /// - /// - /// - /// Default Value: j2-light - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2LightCustomModelCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2MidCustomModelComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2MidCustomModelComplete.g.cs deleted file mode 100644 index a2279af..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2MidCustomModelComplete.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// Custom j2-mid complete - /// - /// - /// - /// Default Value: j2-mid - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2MidCustomModelCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Custom j2-mid complete - /// - /// - /// - /// Default Value: j2-mid - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2MidCustomModelCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2UltraComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2UltraComplete.g.cs deleted file mode 100644 index ff33e93..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2UltraComplete.g.cs +++ /dev/null @@ -1,87 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// Custom j2-ultra complete - /// - /// - /// - /// Default Value: j2-ultra - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( - string customModelName, - global::AI21.CompletionBody request, - string? customModelType = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Custom j2-ultra complete - /// - /// - /// - /// Default Value: j2-ultra - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( - string customModelName, - string prompt, - string? customModelType = default, - int? requestStartTime = default, - int? numResults = default, - int? maxTokens = default, - int? minTokens = default, - double? temperature = default, - double? topP = default, - double? minP = default, - global::System.Collections.Generic.IList? stopSequences = default, - int? topKReturn = default, - object? logitBias = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? epoch = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICompletionClient.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.g.cs deleted file mode 100644 index d6b192b..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.g.cs +++ /dev/null @@ -1,40 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// If no httpClient is provided, a new one will be created.
- /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. - ///
- public partial interface ICompletionClient : global::System.IDisposable - { - /// - /// The HttpClient instance. - /// - public global::System.Net.Http.HttpClient HttpClient { get; } - - /// - /// The base URL for the API. - /// - public System.Uri? BaseUri { get; } - - /// - /// The authorizations to use for the requests. - /// - public global::System.Collections.Generic.List Authorizations { get; } - - /// - /// Gets or sets a value indicating whether the response content should be read as a string. - /// True by default in debug builds, false otherwise. - /// - public bool ReadResponseAsString { get; set; } - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1CreateCustomModel.g.cs b/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1CreateCustomModel.g.cs deleted file mode 100644 index afdaf67..0000000 --- a/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1CreateCustomModel.g.cs +++ /dev/null @@ -1,45 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICustomModelsClient - { - /// - /// Create Custom Model - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1CreateCustomModelAsync( - global::AI21.CustomModelInput request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Create Custom Model - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// An enumeration. - /// - /// - /// - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1CreateCustomModelAsync( - global::AI21.CustomModelType modelType, - string datasetId, - string modelName, - int? requestStartTime = default, - double? learningRate = default, - int? numEpochs = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1DeleteCustomModel.g.cs b/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1DeleteCustomModel.g.cs deleted file mode 100644 index b5ce4f2..0000000 --- a/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1DeleteCustomModel.g.cs +++ /dev/null @@ -1,21 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICustomModelsClient - { - /// - /// Delete Model - /// - /// - /// - /// Default Value: 1730898900272 - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1DeleteCustomModelAsync( - string modelPid, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1GetCustomModel.g.cs b/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1GetCustomModel.g.cs deleted file mode 100644 index 0521b60..0000000 --- a/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1GetCustomModel.g.cs +++ /dev/null @@ -1,21 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICustomModelsClient - { - /// - /// Get Custom Model - /// - /// - /// - /// Default Value: 1730898900272 - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1GetCustomModelAsync( - string customModelPid, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1GetCustomModels.g.cs b/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1GetCustomModels.g.cs deleted file mode 100644 index c725405..0000000 --- a/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1GetCustomModels.g.cs +++ /dev/null @@ -1,23 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICustomModelsClient - { - /// - /// Get Custom Models List - /// - /// - /// Default Value: false - /// - /// - /// Default Value: 1730898900272 - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1GetCustomModelsAsync( - bool? includeMetadata = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1UpdateCustomModel.g.cs b/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1UpdateCustomModel.g.cs deleted file mode 100644 index 5e342a6..0000000 --- a/src/libs/AI21/Generated/AI21.ICustomModelsClient.V1UpdateCustomModel.g.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICustomModelsClient - { - /// - /// Update Model - /// - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1UpdateCustomModelAsync( - string customModelPid, - global::AI21.CustomModelUpdateBody request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Update Model - /// - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1UpdateCustomModelAsync( - string customModelPid, - int? requestStartTime = default, - int? defaultEpoch = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ICustomModelsClient.g.cs b/src/libs/AI21/Generated/AI21.ICustomModelsClient.g.cs deleted file mode 100644 index d66d59b..0000000 --- a/src/libs/AI21/Generated/AI21.ICustomModelsClient.g.cs +++ /dev/null @@ -1,40 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// If no httpClient is provided, a new one will be created.
- /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. - ///
- public partial interface ICustomModelsClient : global::System.IDisposable - { - /// - /// The HttpClient instance. - /// - public global::System.Net.Http.HttpClient HttpClient { get; } - - /// - /// The base URL for the API. - /// - public System.Uri? BaseUri { get; } - - /// - /// The authorizations to use for the requests. - /// - public global::System.Collections.Generic.List Authorizations { get; } - - /// - /// Gets or sets a value indicating whether the response content should be read as a string. - /// True by default in debug builds, false otherwise. - /// - public bool ReadResponseAsString { get; set; } - - /// - /// - /// - global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } - - - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CompletionBody.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.CompletionBody.Json.g.cs deleted file mode 100644 index c96b15c..0000000 --- a/src/libs/AI21/Generated/AI21.Models.CompletionBody.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class CompletionBody - { - /// - /// 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::AI21.CompletionBody? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.CompletionBody), - jsonSerializerContext) as global::AI21.CompletionBody; - } - - /// - /// 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::AI21.CompletionBody? 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::AI21.CompletionBody), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.CompletionBody; - } - - /// - /// 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/AI21/Generated/AI21.Models.CompletionBody.g.cs b/src/libs/AI21/Generated/AI21.Models.CompletionBody.g.cs deleted file mode 100644 index db6e497..0000000 --- a/src/libs/AI21/Generated/AI21.Models.CompletionBody.g.cs +++ /dev/null @@ -1,173 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class CompletionBody - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("prompt")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Prompt { get; set; } - - /// - /// Default Value: 1 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("numResults")] - public int? NumResults { get; set; } - - /// - /// Default Value: 16 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("maxTokens")] - public int? MaxTokens { get; set; } - - /// - /// Default Value: 0 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("minTokens")] - public int? MinTokens { get; set; } - - /// - /// Default Value: 1 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } - - /// - /// Default Value: 1 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("topP")] - public double? TopP { get; set; } - - /// - /// Default Value: 0 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("minP")] - public double? MinP { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("stopSequences")] - public global::System.Collections.Generic.IList? StopSequences { get; set; } - - /// - /// Default Value: 0 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("topKReturn")] - public int? TopKReturn { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("logitBias")] - public object? LogitBias { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("frequencyPenalty")] - public global::AI21.Penalty? FrequencyPenalty { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("presencePenalty")] - public global::AI21.Penalty? PresencePenalty { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("countPenalty")] - public global::AI21.Penalty? CountPenalty { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("epoch")] - public int? Epoch { 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: 1 - /// - /// - /// Default Value: 16 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// - /// Default Value: 0 - /// - /// - /// - /// - /// - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public CompletionBody( - string prompt, - int? numResults, - int? maxTokens, - int? minTokens, - double? temperature, - double? topP, - double? minP, - global::System.Collections.Generic.IList? stopSequences, - int? topKReturn, - object? logitBias, - global::AI21.Penalty? frequencyPenalty, - global::AI21.Penalty? presencePenalty, - global::AI21.Penalty? countPenalty, - int? epoch) - { - this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); - this.NumResults = numResults; - this.MaxTokens = maxTokens; - this.MinTokens = minTokens; - this.Temperature = temperature; - this.TopP = topP; - this.MinP = minP; - this.StopSequences = stopSequences; - this.TopKReturn = topKReturn; - this.LogitBias = logitBias; - this.FrequencyPenalty = frequencyPenalty; - this.PresencePenalty = presencePenalty; - this.CountPenalty = countPenalty; - this.Epoch = epoch; - } - - /// - /// Initializes a new instance of the class. - /// - public CompletionBody() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CompletionBodyLogitBias.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.CompletionBodyLogitBias.Json.g.cs deleted file mode 100644 index 00fac81..0000000 --- a/src/libs/AI21/Generated/AI21.Models.CompletionBodyLogitBias.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class CompletionBodyLogitBias - { - /// - /// 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::AI21.CompletionBodyLogitBias? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.CompletionBodyLogitBias), - jsonSerializerContext) as global::AI21.CompletionBodyLogitBias; - } - - /// - /// 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::AI21.CompletionBodyLogitBias? 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::AI21.CompletionBodyLogitBias), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.CompletionBodyLogitBias; - } - - /// - /// 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/AI21/Generated/AI21.Models.CompletionBodyLogitBias.g.cs b/src/libs/AI21/Generated/AI21.Models.CompletionBodyLogitBias.g.cs deleted file mode 100644 index 1137a1d..0000000 --- a/src/libs/AI21/Generated/AI21.Models.CompletionBodyLogitBias.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class CompletionBodyLogitBias - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public CompletionBodyLogitBias( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CustomModelInput.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.CustomModelInput.Json.g.cs deleted file mode 100644 index e33053d..0000000 --- a/src/libs/AI21/Generated/AI21.Models.CustomModelInput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class CustomModelInput - { - /// - /// 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::AI21.CustomModelInput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.CustomModelInput), - jsonSerializerContext) as global::AI21.CustomModelInput; - } - - /// - /// 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::AI21.CustomModelInput? 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::AI21.CustomModelInput), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.CustomModelInput; - } - - /// - /// 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/AI21/Generated/AI21.Models.CustomModelInput.g.cs b/src/libs/AI21/Generated/AI21.Models.CustomModelInput.g.cs deleted file mode 100644 index dc0d703..0000000 --- a/src/libs/AI21/Generated/AI21.Models.CustomModelInput.g.cs +++ /dev/null @@ -1,83 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class CustomModelInput - { - /// - /// An enumeration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model_type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.CustomModelTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::AI21.CustomModelType ModelType { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("learning_rate")] - public double? LearningRate { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("num_epochs")] - public int? NumEpochs { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("dataset_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string DatasetId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("model_name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ModelName { 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. - /// - /// - /// An enumeration. - /// - /// - /// - /// - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public CustomModelInput( - global::AI21.CustomModelType modelType, - string datasetId, - string modelName, - double? learningRate, - int? numEpochs) - { - this.ModelType = modelType; - this.DatasetId = datasetId ?? throw new global::System.ArgumentNullException(nameof(datasetId)); - this.ModelName = modelName ?? throw new global::System.ArgumentNullException(nameof(modelName)); - this.LearningRate = learningRate; - this.NumEpochs = numEpochs; - } - - /// - /// Initializes a new instance of the class. - /// - public CustomModelInput() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CustomModelType.g.cs b/src/libs/AI21/Generated/AI21.Models.CustomModelType.g.cs deleted file mode 100644 index 3b58672..0000000 --- a/src/libs/AI21/Generated/AI21.Models.CustomModelType.g.cs +++ /dev/null @@ -1,75 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// An enumeration. - /// - public enum CustomModelType - { - /// - /// - /// - J2Large, - /// - /// - /// - J2Grande, - /// - /// - /// - J2Jumbo, - /// - /// - /// - J2Light, - /// - /// - /// - J2Mid, - /// - /// - /// - J2Ultra, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CustomModelTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CustomModelType value) - { - return value switch - { - CustomModelType.J2Large => "j2-large", - CustomModelType.J2Grande => "j2-grande", - CustomModelType.J2Jumbo => "j2-jumbo", - CustomModelType.J2Light => "j2-light", - CustomModelType.J2Mid => "j2-mid", - CustomModelType.J2Ultra => "j2-ultra", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CustomModelType? ToEnum(string value) - { - return value switch - { - "j2-large" => CustomModelType.J2Large, - "j2-grande" => CustomModelType.J2Grande, - "j2-jumbo" => CustomModelType.J2Jumbo, - "j2-light" => CustomModelType.J2Light, - "j2-mid" => CustomModelType.J2Mid, - "j2-ultra" => CustomModelType.J2Ultra, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CustomModelUpdateBody.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.CustomModelUpdateBody.Json.g.cs deleted file mode 100644 index 69af691..0000000 --- a/src/libs/AI21/Generated/AI21.Models.CustomModelUpdateBody.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class CustomModelUpdateBody - { - /// - /// 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::AI21.CustomModelUpdateBody? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.CustomModelUpdateBody), - jsonSerializerContext) as global::AI21.CustomModelUpdateBody; - } - - /// - /// 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::AI21.CustomModelUpdateBody? 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::AI21.CustomModelUpdateBody), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.CustomModelUpdateBody; - } - - /// - /// 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/AI21/Generated/AI21.Models.CustomModelUpdateBody.g.cs b/src/libs/AI21/Generated/AI21.Models.CustomModelUpdateBody.g.cs deleted file mode 100644 index 544ff5f..0000000 --- a/src/libs/AI21/Generated/AI21.Models.CustomModelUpdateBody.g.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class CustomModelUpdateBody - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("defaultEpoch")] - public int? DefaultEpoch { 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. - /// - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public CustomModelUpdateBody( - int? defaultEpoch) - { - this.DefaultEpoch = defaultEpoch; - } - - /// - /// Initializes a new instance of the class. - /// - public CustomModelUpdateBody() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.Penalty.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.Penalty.Json.g.cs deleted file mode 100644 index 2988230..0000000 --- a/src/libs/AI21/Generated/AI21.Models.Penalty.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class Penalty - { - /// - /// 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::AI21.Penalty? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.Penalty), - jsonSerializerContext) as global::AI21.Penalty; - } - - /// - /// 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::AI21.Penalty? 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::AI21.Penalty), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.Penalty; - } - - /// - /// 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/AI21/Generated/AI21.Models.Penalty.g.cs b/src/libs/AI21/Generated/AI21.Models.Penalty.g.cs deleted file mode 100644 index e015f7c..0000000 --- a/src/libs/AI21/Generated/AI21.Models.Penalty.g.cs +++ /dev/null @@ -1,97 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class Penalty - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("scale")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double Scale { get; set; } - - /// - /// Default Value: true - /// - [global::System.Text.Json.Serialization.JsonPropertyName("applyToWhitespaces")] - public bool? ApplyToWhitespaces { get; set; } - - /// - /// Default Value: true - /// - [global::System.Text.Json.Serialization.JsonPropertyName("applyToPunctuations")] - public bool? ApplyToPunctuations { get; set; } - - /// - /// Default Value: true - /// - [global::System.Text.Json.Serialization.JsonPropertyName("applyToNumbers")] - public bool? ApplyToNumbers { get; set; } - - /// - /// Default Value: true - /// - [global::System.Text.Json.Serialization.JsonPropertyName("applyToStopwords")] - public bool? ApplyToStopwords { get; set; } - - /// - /// Default Value: true - /// - [global::System.Text.Json.Serialization.JsonPropertyName("applyToEmojis")] - public bool? ApplyToEmojis { 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 - /// - /// - /// Default Value: true - /// - /// - /// Default Value: true - /// - /// - /// Default Value: true - /// - /// - /// Default Value: true - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public Penalty( - double scale, - bool? applyToWhitespaces, - bool? applyToPunctuations, - bool? applyToNumbers, - bool? applyToStopwords, - bool? applyToEmojis) - { - this.Scale = scale; - this.ApplyToWhitespaces = applyToWhitespaces; - this.ApplyToPunctuations = applyToPunctuations; - this.ApplyToNumbers = applyToNumbers; - this.ApplyToStopwords = applyToStopwords; - this.ApplyToEmojis = applyToEmojis; - } - - /// - /// Initializes a new instance of the class. - /// - public Penalty() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1CreateCustomModelResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1CreateCustomModelResponse.Json.g.cs deleted file mode 100644 index 48d2e76..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1CreateCustomModelResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1CreateCustomModelResponse - { - /// - /// 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::AI21.V1CreateCustomModelResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1CreateCustomModelResponse), - jsonSerializerContext) as global::AI21.V1CreateCustomModelResponse; - } - - /// - /// 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::AI21.V1CreateCustomModelResponse? 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::AI21.V1CreateCustomModelResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1CreateCustomModelResponse; - } - - /// - /// 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/AI21/Generated/AI21.Models.V1CreateCustomModelResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1CreateCustomModelResponse.g.cs deleted file mode 100644 index a33d4b4..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1CreateCustomModelResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1CreateCustomModelResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public V1CreateCustomModelResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1DeleteCustomModelResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1DeleteCustomModelResponse.Json.g.cs deleted file mode 100644 index 6775130..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1DeleteCustomModelResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1DeleteCustomModelResponse - { - /// - /// 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::AI21.V1DeleteCustomModelResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1DeleteCustomModelResponse), - jsonSerializerContext) as global::AI21.V1DeleteCustomModelResponse; - } - - /// - /// 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::AI21.V1DeleteCustomModelResponse? 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::AI21.V1DeleteCustomModelResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1DeleteCustomModelResponse; - } - - /// - /// 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/AI21/Generated/AI21.Models.V1DeleteCustomModelResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1DeleteCustomModelResponse.g.cs deleted file mode 100644 index e5762da..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1DeleteCustomModelResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1DeleteCustomModelResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public V1DeleteCustomModelResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1GetCustomModelResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1GetCustomModelResponse.Json.g.cs deleted file mode 100644 index 462bb3b..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1GetCustomModelResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1GetCustomModelResponse - { - /// - /// 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::AI21.V1GetCustomModelResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1GetCustomModelResponse), - jsonSerializerContext) as global::AI21.V1GetCustomModelResponse; - } - - /// - /// 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::AI21.V1GetCustomModelResponse? 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::AI21.V1GetCustomModelResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1GetCustomModelResponse; - } - - /// - /// 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/AI21/Generated/AI21.Models.V1GetCustomModelResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1GetCustomModelResponse.g.cs deleted file mode 100644 index 21c26df..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1GetCustomModelResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1GetCustomModelResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public V1GetCustomModelResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1GetCustomModelsResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1GetCustomModelsResponse.Json.g.cs deleted file mode 100644 index c7e8b31..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1GetCustomModelsResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1GetCustomModelsResponse - { - /// - /// 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::AI21.V1GetCustomModelsResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1GetCustomModelsResponse), - jsonSerializerContext) as global::AI21.V1GetCustomModelsResponse; - } - - /// - /// 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::AI21.V1GetCustomModelsResponse? 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::AI21.V1GetCustomModelsResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1GetCustomModelsResponse; - } - - /// - /// 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/AI21/Generated/AI21.Models.V1GetCustomModelsResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1GetCustomModelsResponse.g.cs deleted file mode 100644 index 7a0ce6b..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1GetCustomModelsResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1GetCustomModelsResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public V1GetCustomModelsResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2GrandeCustomModelCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2GrandeCustomModelCompleteResponse.Json.g.cs deleted file mode 100644 index f85a625..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2GrandeCustomModelCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2GrandeCustomModelCompleteResponse - { - /// - /// 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::AI21.V1J2GrandeCustomModelCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2GrandeCustomModelCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2GrandeCustomModelCompleteResponse; - } - - /// - /// 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::AI21.V1J2GrandeCustomModelCompleteResponse? 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::AI21.V1J2GrandeCustomModelCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2GrandeCustomModelCompleteResponse; - } - - /// - /// 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/AI21/Generated/AI21.Models.V1J2GrandeCustomModelCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2GrandeCustomModelCompleteResponse.g.cs deleted file mode 100644 index a9bbca7..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2GrandeCustomModelCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2GrandeCustomModelCompleteResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public V1J2GrandeCustomModelCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse.Json.g.cs deleted file mode 100644 index 1d99b25..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2JumboCompleteResponse - { - /// - /// 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::AI21.V1J2JumboCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2JumboCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2JumboCompleteResponse; - } - - /// - /// 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::AI21.V1J2JumboCompleteResponse? 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::AI21.V1J2JumboCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2JumboCompleteResponse; - } - - /// - /// 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/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse.g.cs deleted file mode 100644 index 22c76a0..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2JumboCompleteResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public V1J2JumboCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2LargeCustomModelCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2LargeCustomModelCompleteResponse.Json.g.cs deleted file mode 100644 index 2b6f3e7..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2LargeCustomModelCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2LargeCustomModelCompleteResponse - { - /// - /// 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::AI21.V1J2LargeCustomModelCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2LargeCustomModelCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2LargeCustomModelCompleteResponse; - } - - /// - /// 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::AI21.V1J2LargeCustomModelCompleteResponse? 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::AI21.V1J2LargeCustomModelCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2LargeCustomModelCompleteResponse; - } - - /// - /// 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/AI21/Generated/AI21.Models.V1J2LargeCustomModelCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2LargeCustomModelCompleteResponse.g.cs deleted file mode 100644 index 896b60b..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2LargeCustomModelCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2LargeCustomModelCompleteResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public V1J2LargeCustomModelCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2LightCustomModelCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2LightCustomModelCompleteResponse.Json.g.cs deleted file mode 100644 index 1c7d043..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2LightCustomModelCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2LightCustomModelCompleteResponse - { - /// - /// 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::AI21.V1J2LightCustomModelCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2LightCustomModelCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2LightCustomModelCompleteResponse; - } - - /// - /// 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::AI21.V1J2LightCustomModelCompleteResponse? 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::AI21.V1J2LightCustomModelCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2LightCustomModelCompleteResponse; - } - - /// - /// 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/AI21/Generated/AI21.Models.V1J2LightCustomModelCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2LightCustomModelCompleteResponse.g.cs deleted file mode 100644 index 72bc2c8..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2LightCustomModelCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2LightCustomModelCompleteResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public V1J2LightCustomModelCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2MidCustomModelCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2MidCustomModelCompleteResponse.Json.g.cs deleted file mode 100644 index 311cbec..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2MidCustomModelCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2MidCustomModelCompleteResponse - { - /// - /// 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::AI21.V1J2MidCustomModelCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2MidCustomModelCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2MidCustomModelCompleteResponse; - } - - /// - /// 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::AI21.V1J2MidCustomModelCompleteResponse? 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::AI21.V1J2MidCustomModelCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2MidCustomModelCompleteResponse; - } - - /// - /// 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/AI21/Generated/AI21.Models.V1J2MidCustomModelCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2MidCustomModelCompleteResponse.g.cs deleted file mode 100644 index 5d70a7b..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2MidCustomModelCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2MidCustomModelCompleteResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public V1J2MidCustomModelCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse.Json.g.cs deleted file mode 100644 index 8113253..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2UltraCompleteResponse - { - /// - /// 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::AI21.V1J2UltraCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2UltraCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2UltraCompleteResponse; - } - - /// - /// 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::AI21.V1J2UltraCompleteResponse? 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::AI21.V1J2UltraCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2UltraCompleteResponse; - } - - /// - /// 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/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse.g.cs deleted file mode 100644 index a02bef8..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2UltraCompleteResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public V1J2UltraCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1UpdateCustomModelResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1UpdateCustomModelResponse.Json.g.cs deleted file mode 100644 index 336a645..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1UpdateCustomModelResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1UpdateCustomModelResponse - { - /// - /// 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::AI21.V1UpdateCustomModelResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1UpdateCustomModelResponse), - jsonSerializerContext) as global::AI21.V1UpdateCustomModelResponse; - } - - /// - /// 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::AI21.V1UpdateCustomModelResponse? 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::AI21.V1UpdateCustomModelResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1UpdateCustomModelResponse; - } - - /// - /// 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/AI21/Generated/AI21.Models.V1UpdateCustomModelResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1UpdateCustomModelResponse.g.cs deleted file mode 100644 index b274cc7..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1UpdateCustomModelResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1UpdateCustomModelResponse - { - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public V1UpdateCustomModelResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/JsonConverters.CustomModelType.g.cs b/src/libs/AI21/Generated/JsonConverters.CustomModelType.g.cs deleted file mode 100644 index 24d922a..0000000 --- a/src/libs/AI21/Generated/JsonConverters.CustomModelType.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class CustomModelTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.CustomModelType 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::AI21.CustomModelTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.CustomModelType)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.CustomModelType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::AI21.CustomModelTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.CustomModelTypeNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.CustomModelTypeNullable.g.cs deleted file mode 100644 index 7fadcbd..0000000 --- a/src/libs/AI21/Generated/JsonConverters.CustomModelTypeNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class CustomModelTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.CustomModelType? 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::AI21.CustomModelTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.CustomModelType)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.CustomModelType? 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::AI21.CustomModelTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/AI21/Generated/JsonSerializerContext.g.cs b/src/libs/AI21/Generated/JsonSerializerContext.g.cs index 28567fa..e416d96 100644 --- a/src/libs/AI21/Generated/JsonSerializerContext.g.cs +++ b/src/libs/AI21/Generated/JsonSerializerContext.g.cs @@ -41,8 +41,6 @@ namespace AI21 typeof(global::AI21.JsonConverters.MessageRoleNullableJsonConverter), typeof(global::AI21.JsonConverters.ConversationalRagConfigRetrievalStrategyJsonConverter), typeof(global::AI21.JsonConverters.ConversationalRagConfigRetrievalStrategyNullableJsonConverter), - typeof(global::AI21.JsonConverters.CustomModelTypeJsonConverter), - typeof(global::AI21.JsonConverters.CustomModelTypeNullableJsonConverter), typeof(global::AI21.JsonConverters.FileStatusJsonConverter), typeof(global::AI21.JsonConverters.FileStatusNullableJsonConverter), typeof(global::AI21.JsonConverters.LibrarySearchRequestLabelsFilterModeJsonConverter), @@ -55,6 +53,7 @@ namespace AI21 typeof(global::AI21.JsonConverters.AnyOfJsonConverter>), typeof(global::AI21.JsonConverters.AnyOfJsonConverter), typeof(global::AI21.JsonConverters.AnyOfJsonConverter>), + typeof(global::AI21.JsonConverters.UnixTimestampJsonConverter), })] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::AI21.JsonSerializerContextTypes))] diff --git a/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs b/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs index df3fdbf..9efb5cd 100644 --- a/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs @@ -246,162 +246,142 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::AI21.CompletionBody? Type57 { get; set; } + public global::AI21.ConnectorsDataSources? Type57 { get; set; } /// /// /// - public global::AI21.Penalty? Type58 { get; set; } + public global::System.Collections.Generic.IList? Type58 { get; set; } /// /// /// - public global::AI21.ConnectorsDataSources? Type59 { get; set; } + public global::AI21.DataSourceMetadata? Type59 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type60 { get; set; } + public global::AI21.ConnectorsStatus? Type60 { get; set; } /// /// /// - public global::AI21.DataSourceMetadata? Type61 { get; set; } + public global::AI21.ConnectorsWorkflowStatus? Type61 { get; set; } /// /// /// - public global::AI21.ConnectorsStatus? Type62 { get; set; } + public global::AI21.ConnectorsToken? Type62 { get; set; } /// /// /// - public global::AI21.ConnectorsWorkflowStatus? Type63 { get; set; } + public global::AI21.ConversationalRagConfig? Type63 { get; set; } /// /// /// - public global::AI21.ConnectorsToken? Type64 { get; set; } + public global::System.Collections.Generic.IList? Type64 { get; set; } /// /// /// - public global::AI21.ConversationalRagConfig? Type65 { get; set; } + public global::AI21.Message? Type65 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type66 { get; set; } + public global::AI21.MessageRole? Type66 { get; set; } /// /// /// - public global::AI21.Message? Type67 { get; set; } + public global::AI21.ConversationalRagConfigRetrievalStrategy? Type67 { get; set; } /// /// /// - public global::AI21.MessageRole? Type68 { get; set; } + public global::AI21.ConversationalRagResult? Type68 { get; set; } /// /// /// - public global::AI21.ConversationalRagConfigRetrievalStrategy? Type69 { get; set; } + public global::System.Collections.Generic.IList? Type69 { get; set; } /// /// /// - public global::AI21.ConversationalRagResult? Type70 { get; set; } + public global::AI21.ConversationalRagSource? Type70 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type71 { get; set; } + public global::AI21.FileResponse? Type71 { get; set; } /// /// /// - public global::AI21.ConversationalRagSource? Type72 { get; set; } + public global::System.Guid? Type72 { get; set; } /// /// /// - public global::AI21.CustomModelInput? Type73 { get; set; } + public global::System.DateTime? Type73 { get; set; } /// /// /// - public global::AI21.CustomModelType? Type74 { get; set; } + public global::AI21.FileStatus? Type74 { get; set; } /// /// /// - public global::AI21.CustomModelUpdateBody? Type75 { get; set; } + public global::AI21.FilesUpdateRequest? Type75 { get; set; } /// /// /// - public global::AI21.FileResponse? Type76 { get; set; } + public global::AI21.HTTPValidationError? Type76 { get; set; } /// /// /// - public global::System.Guid? Type77 { get; set; } + public global::System.Collections.Generic.IList? Type77 { get; set; } /// /// /// - public global::System.DateTime? Type78 { get; set; } + public global::AI21.ValidationError? Type78 { get; set; } /// /// /// - public global::AI21.FileStatus? Type79 { get; set; } + public global::System.Collections.Generic.IList>? Type79 { get; set; } /// /// /// - public global::AI21.FilesUpdateRequest? Type80 { get; set; } + public global::AI21.AnyOf? Type80 { get; set; } /// /// /// - public global::AI21.HTTPValidationError? Type81 { get; set; } + public global::AI21.LibrarySearchRequest? Type81 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type82 { get; set; } + public global::AI21.QueryFilter? Type82 { get; set; } /// /// /// - public global::AI21.ValidationError? Type83 { get; set; } + public global::System.Collections.Generic.Dictionary>? Type83 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type84 { get; set; } + public global::System.Collections.Generic.IList? Type84 { get; set; } /// /// /// - public global::AI21.AnyOf? Type85 { get; set; } + public global::System.Collections.Generic.Dictionary? Type85 { get; set; } /// /// /// - public global::AI21.LibrarySearchRequest? Type86 { get; set; } + public global::AI21.LibrarySearchRequestLabelsFilterMode? Type86 { get; set; } /// /// /// - public global::AI21.QueryFilter? Type87 { get; set; } + public global::System.Collections.Generic.IList? Type87 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary>? Type88 { get; set; } + public global::AI21.RetrievalStrategy? Type88 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type89 { get; set; } + public global::AI21.AnyOf>? Type89 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type90 { get; set; } + public global::System.Collections.Generic.IList? Type90 { get; set; } /// /// /// - public global::AI21.LibrarySearchRequestLabelsFilterMode? Type91 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type92 { get; set; } - /// - /// - /// - public global::AI21.RetrievalStrategy? Type93 { get; set; } - /// - /// - /// - public global::AI21.AnyOf>? Type94 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type95 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type96 { get; set; } + public global::System.Collections.Generic.IList? Type91 { get; set; } } } \ No newline at end of file diff --git a/src/libs/AI21/openapi.yaml b/src/libs/AI21/openapi.yaml index 548e27e..e782eae 100644 --- a/src/libs/AI21/openapi.yaml +++ b/src/libs/AI21/openapi.yaml @@ -79,423 +79,6 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - '/studio/v1/j2-light/{custom_model_name}/complete': - post: - tags: - - completion - summary: Custom j2-light complete - operationId: v1_j2_light_custom_model_complete - parameters: - - name: custom_model_name - in: path - required: true - schema: - title: Custom Model Name - type: string - - name: custom_model_type - in: query - schema: - title: Custom Model Type - type: string - default: j2-light - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompletionBody' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: { } - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - '/studio/v1/j2-mid/{custom_model_name}/complete': - post: - tags: - - completion - summary: Custom j2-mid complete - operationId: v1_j2_mid_custom_model_complete - parameters: - - name: custom_model_name - in: path - required: true - schema: - title: Custom Model Name - type: string - - name: custom_model_type - in: query - schema: - title: Custom Model Type - type: string - default: j2-mid - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompletionBody' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: { } - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - '/studio/v1/j2-ultra/{custom_model_name}/complete': - post: - tags: - - completion - summary: Custom j2-ultra complete - operationId: v1_j2_ultra_complete - parameters: - - name: custom_model_name - in: path - required: true - schema: - title: Custom Model Name - type: string - - name: custom_model_type - in: query - schema: - title: Custom Model Type - type: string - default: j2-ultra - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompletionBody' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: { } - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - '/studio/v1/j2-large/{custom_model_name}/complete': - post: - tags: - - completion - summary: Custom j2-large complete - operationId: v1_j2_large_custom_model_complete - parameters: - - name: custom_model_name - in: path - required: true - schema: - title: Custom Model Name - type: string - - name: custom_model_type - in: query - schema: - title: Custom Model Type - type: string - default: j2-large - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompletionBody' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: { } - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - '/studio/v1/j2-grande/{custom_model_name}/complete': - post: - tags: - - completion - summary: Custom j2-grande complete - operationId: v1_j2_grande_custom_model_complete - parameters: - - name: custom_model_name - in: path - required: true - schema: - title: Custom Model Name - type: string - - name: custom_model_type - in: query - schema: - title: Custom Model Type - type: string - default: j2-grande - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompletionBody' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: { } - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - '/studio/v1/j2-jumbo/{custom_model_name}/complete': - post: - tags: - - completion - summary: Custom j2-jumbo complete - operationId: v1_j2_jumbo_complete - parameters: - - name: custom_model_name - in: path - required: true - schema: - title: Custom Model Name - type: string - - name: custom_model_type - in: query - schema: - title: Custom Model Type - type: string - default: j2-jumbo - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompletionBody' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: { } - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - /studio/v1/custom-model: - get: - tags: - - custom-models - summary: Get Custom Models List - operationId: v1_get_custom_models - parameters: - - name: includeMetadata - in: query - schema: - title: Includemetadata - type: boolean - default: false - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - responses: - '200': - description: Successful Response - content: - application/json: - schema: { } - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - post: - tags: - - custom-models - summary: Create Custom Model - operationId: v1_create_custom_model - parameters: - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CustomModelInput' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: { } - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - '/studio/v1/custom-model/{custom_model_pid}': - get: - tags: - - custom-models - summary: Get Custom Model - operationId: v1_get_custom_model - parameters: - - name: custom_model_pid - in: path - required: true - schema: - title: Custom Model Pid - type: string - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - responses: - '200': - description: Successful Response - content: - application/json: - schema: { } - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - put: - tags: - - custom-models - summary: Update Model - operationId: v1_update_custom_model - parameters: - - name: custom_model_pid - in: path - required: true - schema: - title: Custom Model Pid - type: string - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CustomModelUpdateBody' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: { } - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - '/studio/v1/custom-model/{model_pid}': - delete: - tags: - - custom-models - summary: Delete Model - operationId: v1_delete_custom_model - parameters: - - name: model_pid - in: path - required: true - schema: - title: Model Pid - type: string - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - responses: - '200': - description: Successful Response - content: - application/json: - schema: { } - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' /studio/v1/conversational-rag: post: summary: Conversational Rag @@ -1137,87 +720,6 @@ components: ComparisonOperator: title: ComparisonOperator type: object - CompletionBody: - title: CompletionBody - required: - - prompt - type: object - properties: - prompt: - title: Prompt - type: string - numResults: - title: Numresults - type: integer - default: 1 - maxTokens: - title: Maxtokens - type: integer - default: 16 - minTokens: - title: Mintokens - type: integer - default: 0 - temperature: - title: Temperature - type: number - default: 1 - topP: - title: Topp - type: number - default: 1 - minP: - title: Minp - type: number - default: 0 - stopSequences: - title: Stopsequences - type: array - items: - type: string - topKReturn: - title: Topkreturn - type: integer - default: 0 - logitBias: - title: Logitbias - type: object - frequencyPenalty: - title: Frequencypenalty - allOf: - - $ref: '#/components/schemas/Penalty' - default: - scale: 0 - applyToWhitespaces: true - applyToPunctuations: true - applyToNumbers: true - applyToStopwords: true - applyToEmojis: true - presencePenalty: - title: Presencepenalty - allOf: - - $ref: '#/components/schemas/Penalty' - default: - scale: 0 - applyToWhitespaces: true - applyToPunctuations: true - applyToNumbers: true - applyToStopwords: true - applyToEmojis: true - countPenalty: - title: Countpenalty - allOf: - - $ref: '#/components/schemas/Penalty' - default: - scale: 0 - applyToWhitespaces: true - applyToPunctuations: true - applyToNumbers: true - applyToStopwords: true - applyToEmojis: true - epoch: - title: Epoch - type: integer ConnectorsDataSources: title: ConnectorsDataSources required: @@ -1383,45 +885,6 @@ components: type: array items: type: string - CustomModelInput: - title: CustomModelInput - required: - - model_type - - dataset_id - - model_name - type: object - properties: - model_type: - $ref: '#/components/schemas/CustomModelType' - learning_rate: - title: Learning Rate - type: number - num_epochs: - title: Num Epochs - type: integer - dataset_id: - title: Dataset Id - type: string - model_name: - title: Model Name - type: string - CustomModelType: - title: CustomModelType - enum: - - j2-large - - j2-grande - - j2-jumbo - - j2-light - - j2-mid - - j2-ultra - description: An enumeration. - CustomModelUpdateBody: - title: CustomModelUpdateBody - type: object - properties: - defaultEpoch: - title: Defaultepoch - type: integer DataSourceMetadata: title: DataSourceMetadata required: @@ -1705,35 +1168,6 @@ components: - jamba-1.5-large type: string description: An enumeration. - Penalty: - title: Penalty - required: - - scale - type: object - properties: - scale: - title: Scale - type: number - applyToWhitespaces: - title: Applytowhitespaces - type: boolean - default: true - applyToPunctuations: - title: Applytopunctuations - type: boolean - default: true - applyToNumbers: - title: Applytonumbers - type: boolean - default: true - applyToStopwords: - title: Applytostopwords - type: boolean - default: true - applyToEmojis: - title: Applytoemojis - type: boolean - default: true QueryFilter: title: QueryFilter anyOf: