diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.g.cs index 9f53754..9edc911 100644 --- a/src/libs/AI21/Generated/AI21.Ai21Api.g.cs +++ b/src/libs/AI21/Generated/AI21.Ai21Api.g.cs @@ -64,33 +64,6 @@ public sealed partial class Ai21Api : global::AI21.IAi21Api, global::System.IDis JsonSerializerContext = JsonSerializerContext, }; - /// - /// - /// - public ParaphraseClient Paraphrase => new ParaphraseClient(HttpClient, authorizations: Authorizations) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SummarizeClient Summarize => new SummarizeClient(HttpClient, authorizations: Authorizations) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - - /// - /// - /// - public SegmentationClient Segmentation => new SegmentationClient(HttpClient, authorizations: Authorizations) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - /// /// /// @@ -109,15 +82,6 @@ public sealed partial class Ai21Api : global::AI21.IAi21Api, global::System.IDis JsonSerializerContext = JsonSerializerContext, }; - /// - /// - /// - public ChatClient Chat => new ChatClient(HttpClient, authorizations: Authorizations) - { - ReadResponseAsString = ReadResponseAsString, - JsonSerializerContext = JsonSerializerContext, - }; - /// /// Creates a new instance of the Ai21Api. /// If no httpClient is provided, a new one will be created. diff --git a/src/libs/AI21/Generated/AI21.ChatClient.V1J2UltraChat.g.cs b/src/libs/AI21/Generated/AI21.ChatClient.V1J2UltraChat.g.cs deleted file mode 100644 index 2f10cd5..0000000 --- a/src/libs/AI21/Generated/AI21.ChatClient.V1J2UltraChat.g.cs +++ /dev/null @@ -1,281 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class ChatClient - { - partial void PrepareV1J2UltraChatArguments( - global::System.Net.Http.HttpClient httpClient, - ref string? model, - ref int? requestStartTime, - global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest request); - partial void PrepareV1J2UltraChatRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string? model, - int? requestStartTime, - global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest request); - partial void ProcessV1J2UltraChatResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2UltraChatResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// j2-ultra chat - /// - /// - /// Default Value: j2-ultra - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2UltraChatAsync( - global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2UltraChatArguments( - httpClient: HttpClient, - model: ref model, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/j2-ultra/chat", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("model", model) - .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); - PrepareV1J2UltraChatRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - model: model, - 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); - ProcessV1J2UltraChatResponse( - 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); - ProcessV1J2UltraChatResponseContent( - 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 - global::AI21.ChatResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__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), - }; - } - - using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - return - await global::AI21.ChatResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - } - - /// - /// j2-ultra chat - /// - /// - /// Default Value: j2-ultra - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// messages - /// - /// - /// - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0.7 - /// - /// - /// Default Value: 300 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2UltraChatAsync( - global::System.Collections.Generic.IList messages, - string system, - string? model = default, - int? requestStartTime = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? numResults = default, - double? temperature = default, - int? maxTokens = default, - int? minTokens = default, - double? topP = default, - int? topKReturn = default, - global::System.Collections.Generic.IList? stopSequences = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest - { - Messages = messages, - System = system, - FrequencyPenalty = frequencyPenalty, - PresencePenalty = presencePenalty, - CountPenalty = countPenalty, - NumResults = numResults, - Temperature = temperature, - MaxTokens = maxTokens, - MinTokens = minTokens, - TopP = topP, - TopKReturn = topKReturn, - StopSequences = stopSequences, - }; - - return await V1J2UltraChatAsync( - model: model, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ChatClient.g.cs b/src/libs/AI21/Generated/AI21.ChatClient.g.cs deleted file mode 100644 index 333c216..0000000 --- a/src/libs/AI21/Generated/AI21.ChatClient.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 ChatClient : global::AI21.IChatClient, 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 ChatClient. - /// 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 ChatClient( - 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.CompletionClient.V1J2GrandeComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeComplete.g.cs deleted file mode 100644 index 41b10dc..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeComplete.g.cs +++ /dev/null @@ -1,283 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2GrandeCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string? model, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2GrandeCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string? model, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2GrandeCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2GrandeCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// j2-grande complete - /// - /// - /// Default Value: j2-grande - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2GrandeCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2GrandeCompleteArguments( - httpClient: HttpClient, - model: ref model, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/j2-grande/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("model", model) - .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); - PrepareV1J2GrandeCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - model: model, - 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); - ProcessV1J2GrandeCompleteResponse( - 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); - ProcessV1J2GrandeCompleteResponseContent( - 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; - } - } - - /// - /// 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 V1J2GrandeCompleteAsync( - string prompt, - string? model = 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 V1J2GrandeCompleteAsync( - model: model, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeInstructComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeInstructComplete.g.cs deleted file mode 100644 index 2119115..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2GrandeInstructComplete.g.cs +++ /dev/null @@ -1,283 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2GrandeInstructCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string? model, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2GrandeInstructCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string? model, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2GrandeInstructCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2GrandeInstructCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// j2-grande-instruct complete - /// - /// - /// Default Value: j2-grande-instruct - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2GrandeInstructCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2GrandeInstructCompleteArguments( - httpClient: HttpClient, - model: ref model, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/j2-grande-instruct/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("model", model) - .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); - PrepareV1J2GrandeInstructCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - model: model, - 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); - ProcessV1J2GrandeInstructCompleteResponse( - 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); - ProcessV1J2GrandeInstructCompleteResponseContent( - 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; - } - } - - /// - /// j2-grande-instruct complete - /// - /// - /// Default Value: j2-grande-instruct - /// - /// - /// 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 V1J2GrandeInstructCompleteAsync( - string prompt, - string? model = 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 V1J2GrandeInstructCompleteAsync( - model: model, - 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 index 4bcaa9f..f8169ad 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete.g.cs @@ -7,13 +7,15 @@ public partial class CompletionClient { partial void PrepareV1J2JumboCompleteArguments( global::System.Net.Http.HttpClient httpClient, - ref string? model, + 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? model, + string customModelName, + string? customModelType, int? requestStartTime, global::AI21.CompletionBody request); partial void ProcessV1J2JumboCompleteResponse( @@ -26,9 +28,10 @@ partial void ProcessV1J2JumboCompleteResponseContent( ref string content); /// - /// j2-jumbo complete + /// Custom j2-jumbo complete /// - /// + /// + /// /// Default Value: j2-jumbo /// /// @@ -38,8 +41,9 @@ partial void ProcessV1J2JumboCompleteResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( + string customModelName, global::AI21.CompletionBody request, - string? model = default, + string? customModelType = default, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -49,15 +53,16 @@ partial void ProcessV1J2JumboCompleteResponseContent( client: HttpClient); PrepareV1J2JumboCompleteArguments( httpClient: HttpClient, - model: ref model, + customModelName: ref customModelName, + customModelType: ref customModelType, requestStartTime: ref requestStartTime, request: request); var __pathBuilder = new PathBuilder( - path: "/studio/v1/j2-jumbo/complete", + path: $"/studio/v1/j2-jumbo/{customModelName}/complete", baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("model", model) + .AddOptionalParameter("custom_model_type", customModelType) .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) ; var __path = __pathBuilder.ToString(); @@ -93,7 +98,8 @@ partial void ProcessV1J2JumboCompleteResponseContent( PrepareV1J2JumboCompleteRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - model: model, + customModelName: customModelName, + customModelType: customModelType, requestStartTime: requestStartTime, request: request); @@ -198,9 +204,10 @@ partial void ProcessV1J2JumboCompleteResponseContent( } /// - /// j2-jumbo complete + /// Custom j2-jumbo complete /// - /// + /// + /// /// Default Value: j2-jumbo /// /// @@ -237,8 +244,9 @@ partial void ProcessV1J2JumboCompleteResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( + string customModelName, string prompt, - string? model = default, + string? customModelType = default, int? requestStartTime = default, int? numResults = default, int? maxTokens = default, @@ -274,7 +282,8 @@ partial void ProcessV1J2JumboCompleteResponseContent( }; return await V1J2JumboCompleteAsync( - model: model, + customModelName: customModelName, + customModelType: customModelType, requestStartTime: requestStartTime, request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete2.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete2.g.cs deleted file mode 100644 index 4cd1d10..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboComplete2.g.cs +++ /dev/null @@ -1,292 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2JumboComplete2Arguments( - global::System.Net.Http.HttpClient httpClient, - ref string customModelName, - ref string? customModelType, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2JumboComplete2Request( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string customModelName, - string? customModelType, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2JumboComplete2Response( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2JumboComplete2ResponseContent( - 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 V1J2JumboComplete2Async( - 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); - PrepareV1J2JumboComplete2Arguments( - 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); - PrepareV1J2JumboComplete2Request( - 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); - ProcessV1J2JumboComplete2Response( - 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); - ProcessV1J2JumboComplete2ResponseContent( - 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 V1J2JumboComplete2Async( - 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 V1J2JumboComplete2Async( - 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.V1J2JumboInstructComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboInstructComplete.g.cs deleted file mode 100644 index 1307397..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2JumboInstructComplete.g.cs +++ /dev/null @@ -1,283 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2JumboInstructCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string? model, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2JumboInstructCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string? model, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2JumboInstructCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2JumboInstructCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// j2-jumbo-instruct complete - /// - /// - /// Default Value: j2-jumbo-instruct - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2JumboInstructCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2JumboInstructCompleteArguments( - httpClient: HttpClient, - model: ref model, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/j2-jumbo-instruct/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("model", model) - .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); - PrepareV1J2JumboInstructCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - model: model, - 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); - ProcessV1J2JumboInstructCompleteResponse( - 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); - ProcessV1J2JumboInstructCompleteResponseContent( - 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; - } - } - - /// - /// j2-jumbo-instruct complete - /// - /// - /// Default Value: j2-jumbo-instruct - /// - /// - /// 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 V1J2JumboInstructCompleteAsync( - string prompt, - string? model = 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 V1J2JumboInstructCompleteAsync( - model: model, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeComplete.g.cs deleted file mode 100644 index 7711396..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeComplete.g.cs +++ /dev/null @@ -1,283 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2LargeCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string? model, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2LargeCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string? model, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2LargeCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2LargeCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// j2-large complete - /// - /// - /// Default Value: j2-large - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2LargeCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2LargeCompleteArguments( - httpClient: HttpClient, - model: ref model, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/j2-large/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("model", model) - .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); - PrepareV1J2LargeCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - model: model, - 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); - ProcessV1J2LargeCompleteResponse( - 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); - ProcessV1J2LargeCompleteResponseContent( - 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; - } - } - - /// - /// 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 V1J2LargeCompleteAsync( - string prompt, - string? model = 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 V1J2LargeCompleteAsync( - model: model, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeInstructComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeInstructComplete.g.cs deleted file mode 100644 index 4f0f4bd..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LargeInstructComplete.g.cs +++ /dev/null @@ -1,283 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2LargeInstructCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string? model, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2LargeInstructCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string? model, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2LargeInstructCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2LargeInstructCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// j2-large-instruct complete - /// - /// - /// Default Value: j2-large-instruct - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2LargeInstructCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2LargeInstructCompleteArguments( - httpClient: HttpClient, - model: ref model, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/j2-large-instruct/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("model", model) - .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); - PrepareV1J2LargeInstructCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - model: model, - 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); - ProcessV1J2LargeInstructCompleteResponse( - 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); - ProcessV1J2LargeInstructCompleteResponseContent( - 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; - } - } - - /// - /// j2-large-instruct complete - /// - /// - /// Default Value: j2-large-instruct - /// - /// - /// 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 V1J2LargeInstructCompleteAsync( - string prompt, - string? model = 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 V1J2LargeInstructCompleteAsync( - model: model, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightComplete.g.cs deleted file mode 100644 index 3dbffaa..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2LightComplete.g.cs +++ /dev/null @@ -1,283 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2LightCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string? model, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2LightCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string? model, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2LightCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2LightCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// j2-light complete - /// - /// - /// Default Value: j2-light - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2LightCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2LightCompleteArguments( - httpClient: HttpClient, - model: ref model, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/j2-light/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("model", model) - .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); - PrepareV1J2LightCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - model: model, - 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); - ProcessV1J2LightCompleteResponse( - 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); - ProcessV1J2LightCompleteResponseContent( - 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; - } - } - - /// - /// 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 V1J2LightCompleteAsync( - string prompt, - string? model = 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 V1J2LightCompleteAsync( - model: model, - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidComplete.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidComplete.g.cs deleted file mode 100644 index 667d110..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2MidComplete.g.cs +++ /dev/null @@ -1,283 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2MidCompleteArguments( - global::System.Net.Http.HttpClient httpClient, - ref string? model, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2MidCompleteRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string? model, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2MidCompleteResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2MidCompleteResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// j2-mid complete - /// - /// - /// Default Value: j2-mid - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1J2MidCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1J2MidCompleteArguments( - httpClient: HttpClient, - model: ref model, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/j2-mid/complete", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("model", model) - .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); - PrepareV1J2MidCompleteRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - model: model, - 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); - ProcessV1J2MidCompleteResponse( - 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); - ProcessV1J2MidCompleteResponseContent( - 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; - } - } - - /// - /// 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 V1J2MidCompleteAsync( - string prompt, - string? model = 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 V1J2MidCompleteAsync( - model: model, - 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 index 7b03a08..8de1455 100644 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete.g.cs @@ -7,13 +7,15 @@ public partial class CompletionClient { partial void PrepareV1J2UltraCompleteArguments( global::System.Net.Http.HttpClient httpClient, - ref string? model, + 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? model, + string customModelName, + string? customModelType, int? requestStartTime, global::AI21.CompletionBody request); partial void ProcessV1J2UltraCompleteResponse( @@ -26,9 +28,10 @@ partial void ProcessV1J2UltraCompleteResponseContent( ref string content); /// - /// j2-ultra complete + /// Custom j2-ultra complete /// - /// + /// + /// /// Default Value: j2-ultra /// /// @@ -38,8 +41,9 @@ partial void ProcessV1J2UltraCompleteResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( + string customModelName, global::AI21.CompletionBody request, - string? model = default, + string? customModelType = default, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -49,15 +53,16 @@ partial void ProcessV1J2UltraCompleteResponseContent( client: HttpClient); PrepareV1J2UltraCompleteArguments( httpClient: HttpClient, - model: ref model, + customModelName: ref customModelName, + customModelType: ref customModelType, requestStartTime: ref requestStartTime, request: request); var __pathBuilder = new PathBuilder( - path: "/studio/v1/j2-ultra/complete", + path: $"/studio/v1/j2-ultra/{customModelName}/complete", baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("model", model) + .AddOptionalParameter("custom_model_type", customModelType) .AddOptionalParameter("request_start_time", requestStartTime?.ToString()) ; var __path = __pathBuilder.ToString(); @@ -93,7 +98,8 @@ partial void ProcessV1J2UltraCompleteResponseContent( PrepareV1J2UltraCompleteRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - model: model, + customModelName: customModelName, + customModelType: customModelType, requestStartTime: requestStartTime, request: request); @@ -198,9 +204,10 @@ partial void ProcessV1J2UltraCompleteResponseContent( } /// - /// j2-ultra complete + /// Custom j2-ultra complete /// - /// + /// + /// /// Default Value: j2-ultra /// /// @@ -237,8 +244,9 @@ partial void ProcessV1J2UltraCompleteResponseContent( /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( + string customModelName, string prompt, - string? model = default, + string? customModelType = default, int? requestStartTime = default, int? numResults = default, int? maxTokens = default, @@ -274,7 +282,8 @@ partial void ProcessV1J2UltraCompleteResponseContent( }; return await V1J2UltraCompleteAsync( - model: model, + customModelName: customModelName, + customModelType: customModelType, requestStartTime: requestStartTime, request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete2.g.cs b/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete2.g.cs deleted file mode 100644 index 0256ef7..0000000 --- a/src/libs/AI21/Generated/AI21.CompletionClient.V1J2UltraComplete2.g.cs +++ /dev/null @@ -1,292 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class CompletionClient - { - partial void PrepareV1J2UltraComplete2Arguments( - global::System.Net.Http.HttpClient httpClient, - ref string customModelName, - ref string? customModelType, - ref int? requestStartTime, - global::AI21.CompletionBody request); - partial void PrepareV1J2UltraComplete2Request( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string customModelName, - string? customModelType, - int? requestStartTime, - global::AI21.CompletionBody request); - partial void ProcessV1J2UltraComplete2Response( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1J2UltraComplete2ResponseContent( - 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 V1J2UltraComplete2Async( - 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); - PrepareV1J2UltraComplete2Arguments( - 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); - PrepareV1J2UltraComplete2Request( - 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); - ProcessV1J2UltraComplete2Response( - 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); - ProcessV1J2UltraComplete2ResponseContent( - 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 V1J2UltraComplete2Async( - 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 V1J2UltraComplete2Async( - 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.IAi21Api.g.cs b/src/libs/AI21/Generated/AI21.IAi21Api.g.cs index 5629d52..12e900b 100644 --- a/src/libs/AI21/Generated/AI21.IAi21Api.g.cs +++ b/src/libs/AI21/Generated/AI21.IAi21Api.g.cs @@ -52,21 +52,6 @@ public partial interface IAi21Api : global::System.IDisposable ///
public CustomModelsClient CustomModels { get; } - /// - /// - /// - public ParaphraseClient Paraphrase { get; } - - /// - /// - /// - public SummarizeClient Summarize { get; } - - /// - /// - /// - public SegmentationClient Segmentation { get; } - /// /// /// @@ -77,10 +62,5 @@ public partial interface IAi21Api : global::System.IDisposable /// public RAGEngineClient RAGEngine { get; } - /// - /// - /// - public ChatClient Chat { get; } - } } \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IChatClient.V1J2UltraChat.g.cs b/src/libs/AI21/Generated/AI21.IChatClient.V1J2UltraChat.g.cs deleted file mode 100644 index 68b5012..0000000 --- a/src/libs/AI21/Generated/AI21.IChatClient.V1J2UltraChat.g.cs +++ /dev/null @@ -1,79 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface IChatClient - { - /// - /// j2-ultra chat - /// - /// - /// Default Value: j2-ultra - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2UltraChatAsync( - global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// j2-ultra chat - /// - /// - /// Default Value: j2-ultra - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// messages - /// - /// - /// - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0.7 - /// - /// - /// Default Value: 300 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2UltraChatAsync( - global::System.Collections.Generic.IList messages, - string system, - string? model = default, - int? requestStartTime = default, - global::AI21.Penalty? frequencyPenalty = default, - global::AI21.Penalty? presencePenalty = default, - global::AI21.Penalty? countPenalty = default, - int? numResults = default, - double? temperature = default, - int? maxTokens = default, - int? minTokens = default, - double? topP = default, - int? topKReturn = default, - global::System.Collections.Generic.IList? stopSequences = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IChatClient.g.cs b/src/libs/AI21/Generated/AI21.IChatClient.g.cs deleted file mode 100644 index 52bda2a..0000000 --- a/src/libs/AI21/Generated/AI21.IChatClient.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 IChatClient : 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.ICompletionClient.V1J2GrandeComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2GrandeComplete.g.cs deleted file mode 100644 index 329b8e2..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2GrandeComplete.g.cs +++ /dev/null @@ -1,83 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// j2-grande complete - /// - /// - /// Default Value: j2-grande - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2GrandeCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// 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 V1J2GrandeCompleteAsync( - string prompt, - string? model = 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.V1J2GrandeInstructComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2GrandeInstructComplete.g.cs deleted file mode 100644 index 21e1d2f..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2GrandeInstructComplete.g.cs +++ /dev/null @@ -1,83 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// j2-grande-instruct complete - /// - /// - /// Default Value: j2-grande-instruct - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2GrandeInstructCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// j2-grande-instruct complete - /// - /// - /// Default Value: j2-grande-instruct - /// - /// - /// 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 V1J2GrandeInstructCompleteAsync( - string prompt, - string? model = 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 index cb184d7..0a8989f 100644 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2JumboComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2JumboComplete.g.cs @@ -5,9 +5,10 @@ namespace AI21 public partial interface ICompletionClient { /// - /// j2-jumbo complete + /// Custom j2-jumbo complete /// - /// + /// + /// /// Default Value: j2-jumbo /// /// @@ -17,15 +18,17 @@ public partial interface ICompletionClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( + string customModelName, global::AI21.CompletionBody request, - string? model = default, + string? customModelType = default, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// j2-jumbo complete + /// Custom j2-jumbo complete /// - /// + /// + /// /// Default Value: j2-jumbo /// /// @@ -62,8 +65,9 @@ public partial interface ICompletionClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task V1J2JumboCompleteAsync( + string customModelName, string prompt, - string? model = default, + string? customModelType = default, int? requestStartTime = default, int? numResults = default, int? maxTokens = default, diff --git a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2JumboComplete2.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2JumboComplete2.g.cs deleted file mode 100644 index e685d30..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2JumboComplete2.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 V1J2JumboComplete2Async( - 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 V1J2JumboComplete2Async( - 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.V1J2JumboInstructComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2JumboInstructComplete.g.cs deleted file mode 100644 index 1cd52f2..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2JumboInstructComplete.g.cs +++ /dev/null @@ -1,83 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// j2-jumbo-instruct complete - /// - /// - /// Default Value: j2-jumbo-instruct - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2JumboInstructCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// j2-jumbo-instruct complete - /// - /// - /// Default Value: j2-jumbo-instruct - /// - /// - /// 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 V1J2JumboInstructCompleteAsync( - string prompt, - string? model = 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.V1J2LargeComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LargeComplete.g.cs deleted file mode 100644 index f99b115..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LargeComplete.g.cs +++ /dev/null @@ -1,83 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// j2-large complete - /// - /// - /// Default Value: j2-large - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2LargeCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// 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 V1J2LargeCompleteAsync( - string prompt, - string? model = 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.V1J2LargeInstructComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LargeInstructComplete.g.cs deleted file mode 100644 index ed732dd..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LargeInstructComplete.g.cs +++ /dev/null @@ -1,83 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// j2-large-instruct complete - /// - /// - /// Default Value: j2-large-instruct - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2LargeInstructCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// j2-large-instruct complete - /// - /// - /// Default Value: j2-large-instruct - /// - /// - /// 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 V1J2LargeInstructCompleteAsync( - string prompt, - string? model = 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.V1J2LightComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LightComplete.g.cs deleted file mode 100644 index 7208268..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2LightComplete.g.cs +++ /dev/null @@ -1,83 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// j2-light complete - /// - /// - /// Default Value: j2-light - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2LightCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// 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 V1J2LightCompleteAsync( - string prompt, - string? model = 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.V1J2MidComplete.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2MidComplete.g.cs deleted file mode 100644 index 8e75176..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2MidComplete.g.cs +++ /dev/null @@ -1,83 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ICompletionClient - { - /// - /// j2-mid complete - /// - /// - /// Default Value: j2-mid - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1J2MidCompleteAsync( - global::AI21.CompletionBody request, - string? model = default, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// 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 V1J2MidCompleteAsync( - string prompt, - string? model = 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 index e0b07ed..ff33e93 100644 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2UltraComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2UltraComplete.g.cs @@ -5,9 +5,10 @@ namespace AI21 public partial interface ICompletionClient { /// - /// j2-ultra complete + /// Custom j2-ultra complete /// - /// + /// + /// /// Default Value: j2-ultra /// /// @@ -17,15 +18,17 @@ public partial interface ICompletionClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( + string customModelName, global::AI21.CompletionBody request, - string? model = default, + string? customModelType = default, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default); /// - /// j2-ultra complete + /// Custom j2-ultra complete /// - /// + /// + /// /// Default Value: j2-ultra /// /// @@ -62,8 +65,9 @@ public partial interface ICompletionClient /// The token to cancel the operation with /// global::System.Threading.Tasks.Task V1J2UltraCompleteAsync( + string customModelName, string prompt, - string? model = default, + string? customModelType = default, int? requestStartTime = default, int? numResults = default, int? maxTokens = default, diff --git a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2UltraComplete2.g.cs b/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2UltraComplete2.g.cs deleted file mode 100644 index c7d2bf4..0000000 --- a/src/libs/AI21/Generated/AI21.ICompletionClient.V1J2UltraComplete2.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 V1J2UltraComplete2Async( - 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 V1J2UltraComplete2Async( - 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.IJambaCompleteClient.V1ChatComplete.g.cs b/src/libs/AI21/Generated/AI21.IJambaCompleteClient.V1ChatComplete.g.cs index 28fa22d..19cb36d 100644 --- a/src/libs/AI21/Generated/AI21.IJambaCompleteClient.V1ChatComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.IJambaCompleteClient.V1ChatComplete.g.cs @@ -21,7 +21,7 @@ public partial interface IJambaCompleteClient /// global::System.Threading.Tasks.Task>> V1ChatCompleteAsync( string authorization, - global::AI21.LanguageStudioApiServerDataTypesChatChatRequest request, + global::AI21.ChatRequest request, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default); @@ -41,20 +41,45 @@ public partial interface IJambaCompleteClient /// An enumeration. /// /// - /// messages + /// The previous messages in this chat, from oldest (index 0) to newest. Messages
+ /// must be alternating `user`/`assistant` messages, optionally starting with a `system`
+ /// message. For single turn interactions, this should be an optional `system` message,
+ /// and a single `user` message. Maximum total size for the list is about 256K tokens. /// /// /// + /// How many chat responses to generate. _Range: 1 – 16_ **Notes:**
+ /// - If `n > 1`, setting `temperature=0` will fail because all answers are guaranteed to be duplicates.
+ /// - `n` must be 1 when `stream = True`
/// Default Value: 1 /// /// + /// The maximum number of tokens to allow for each generated response message. Typically
+ /// the best way to limit output length is by providing a length limit in the system
+ /// prompt (for example, "limit your answers to three sentences"). _Range: 0 – 4096_
/// Default Value: 4096 /// - /// + /// + /// How much variation to provide in each answer. Setting this value to 0 guarantees the
+ /// same response to the same question every time. Setting a higher value encourages more
+ /// variation. Modifies the distribution from which tokens are sampled.
+ /// [More information](https://docs.ai21.com/docs/sampling-from-language-models#temperature)
+ /// _Range: 0.0 – 2.0_ + /// /// + /// Limit the pool of next tokens in each step to the top N percentile of possible
+ /// tokens, where 1.0 means the pool of all possible tokens, and 0.01 means the
+ /// pool of only the most likely next tokens. [More information]
+ /// (https://docs.ai21.com/docs/sampling-from-language-models#topp) _Range: 0 \<= value \<=1.0_
/// Default Value: 1 /// - /// + /// + /// End the message when the model generates one of these strings. The stop sequence
+ /// is not included in the generated message. Each sequence can be up to 64K long, and
+ /// can contain newlines as `\n` characters. Examples:
+ /// - Single stop string with a word and a period: "monkeys."
+ /// - Multiple stop strings and a newline: ["cat", "dog", " .", "####", "\n"] + /// /// /// Whether or not to stream the result one token at a time using
/// [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).
diff --git a/src/libs/AI21/Generated/AI21.IParaphraseClient.V1Paraphraze.g.cs b/src/libs/AI21/Generated/AI21.IParaphraseClient.V1Paraphraze.g.cs deleted file mode 100644 index d25a98e..0000000 --- a/src/libs/AI21/Generated/AI21.IParaphraseClient.V1Paraphraze.g.cs +++ /dev/null @@ -1,45 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface IParaphraseClient - { - /// - /// Paraphrase - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1ParaphrazeAsync( - global::AI21.ParaphraseBody request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Paraphrase - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: general - /// - /// - /// Default Value: 0 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1ParaphrazeAsync( - string text, - int? requestStartTime = default, - global::AI21.StyleType? style = default, - int? startIndex = default, - int? endIndex = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IParaphraseClient.g.cs b/src/libs/AI21/Generated/AI21.IParaphraseClient.g.cs deleted file mode 100644 index 38cfc52..0000000 --- a/src/libs/AI21/Generated/AI21.IParaphraseClient.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 IParaphraseClient : 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.ISegmentationClient.V1Segmentation.g.cs b/src/libs/AI21/Generated/AI21.ISegmentationClient.V1Segmentation.g.cs deleted file mode 100644 index 8623ce0..0000000 --- a/src/libs/AI21/Generated/AI21.ISegmentationClient.V1Segmentation.g.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ISegmentationClient - { - /// - /// Segmentation - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1SegmentationAsync( - global::AI21.SegmentationBody request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Segmentation - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// An enumeration. - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1SegmentationAsync( - global::AI21.DocumentType sourceType, - string source, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ISegmentationClient.g.cs b/src/libs/AI21/Generated/AI21.ISegmentationClient.g.cs deleted file mode 100644 index aeb4b3f..0000000 --- a/src/libs/AI21/Generated/AI21.ISegmentationClient.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 ISegmentationClient : 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.ISummarizeClient.V1Summarize.g.cs b/src/libs/AI21/Generated/AI21.ISummarizeClient.V1Summarize.g.cs deleted file mode 100644 index 969a808..0000000 --- a/src/libs/AI21/Generated/AI21.ISummarizeClient.V1Summarize.g.cs +++ /dev/null @@ -1,45 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ISummarizeClient - { - /// - /// Summarize - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1SummarizeAsync( - global::AI21.SummarizeBody request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Summarize - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// An enumeration. - /// - /// - /// - /// An enumeration. - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1SummarizeAsync( - string source, - global::AI21.DocumentType sourceType, - int? requestStartTime = default, - string? focus = default, - global::AI21.SummaryMethod? summaryMethod = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ISummarizeClient.V1SummarizeBySegment.g.cs b/src/libs/AI21/Generated/AI21.ISummarizeClient.V1SummarizeBySegment.g.cs deleted file mode 100644 index 03cfaae..0000000 --- a/src/libs/AI21/Generated/AI21.ISummarizeClient.V1SummarizeBySegment.g.cs +++ /dev/null @@ -1,41 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface ISummarizeClient - { - /// - /// Segmented Summarize - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1SummarizeBySegmentAsync( - global::AI21.SegmentedSummaryBody request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Segmented Summarize - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// An enumeration. - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1SummarizeBySegmentAsync( - string source, - global::AI21.DocumentType sourceType, - int? requestStartTime = default, - string? focus = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ISummarizeClient.g.cs b/src/libs/AI21/Generated/AI21.ISummarizeClient.g.cs deleted file mode 100644 index d5f4a09..0000000 --- a/src/libs/AI21/Generated/AI21.ISummarizeClient.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 ISummarizeClient : 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.JambaCompleteClient.V1ChatComplete.g.cs b/src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs index aff4628..26d6e5e 100644 --- a/src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs @@ -9,13 +9,13 @@ partial void PrepareV1ChatCompleteArguments( global::System.Net.Http.HttpClient httpClient, ref int? requestStartTime, ref string authorization, - global::AI21.LanguageStudioApiServerDataTypesChatChatRequest request); + global::AI21.ChatRequest request); partial void PrepareV1ChatCompleteRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, int? requestStartTime, string authorization, - global::AI21.LanguageStudioApiServerDataTypesChatChatRequest request); + global::AI21.ChatRequest request); partial void ProcessV1ChatCompleteResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -42,7 +42,7 @@ partial void ProcessV1ChatCompleteResponseContent( /// public async global::System.Threading.Tasks.Task>> V1ChatCompleteAsync( string authorization, - global::AI21.LanguageStudioApiServerDataTypesChatChatRequest request, + global::AI21.ChatRequest request, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -222,20 +222,45 @@ partial void ProcessV1ChatCompleteResponseContent( /// An enumeration. /// /// - /// messages + /// The previous messages in this chat, from oldest (index 0) to newest. Messages
+ /// must be alternating `user`/`assistant` messages, optionally starting with a `system`
+ /// message. For single turn interactions, this should be an optional `system` message,
+ /// and a single `user` message. Maximum total size for the list is about 256K tokens. /// /// /// + /// How many chat responses to generate. _Range: 1 – 16_ **Notes:**
+ /// - If `n > 1`, setting `temperature=0` will fail because all answers are guaranteed to be duplicates.
+ /// - `n` must be 1 when `stream = True`
/// Default Value: 1 /// /// + /// The maximum number of tokens to allow for each generated response message. Typically
+ /// the best way to limit output length is by providing a length limit in the system
+ /// prompt (for example, "limit your answers to three sentences"). _Range: 0 – 4096_
/// Default Value: 4096 /// - /// + /// + /// How much variation to provide in each answer. Setting this value to 0 guarantees the
+ /// same response to the same question every time. Setting a higher value encourages more
+ /// variation. Modifies the distribution from which tokens are sampled.
+ /// [More information](https://docs.ai21.com/docs/sampling-from-language-models#temperature)
+ /// _Range: 0.0 – 2.0_ + /// /// + /// Limit the pool of next tokens in each step to the top N percentile of possible
+ /// tokens, where 1.0 means the pool of all possible tokens, and 0.01 means the
+ /// pool of only the most likely next tokens. [More information]
+ /// (https://docs.ai21.com/docs/sampling-from-language-models#topp) _Range: 0 \<= value \<=1.0_
/// Default Value: 1 /// - /// + /// + /// End the message when the model generates one of these strings. The stop sequence
+ /// is not included in the generated message. Each sequence can be up to 64K long, and
+ /// can contain newlines as `\n` characters. Examples:
+ /// - Single stop string with a word and a period: "monkeys."
+ /// - Multiple stop strings and a newline: ["cat", "dog", " .", "####", "\n"] + /// /// /// Whether or not to stream the result one token at a time using
/// [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).
@@ -266,7 +291,7 @@ partial void ProcessV1ChatCompleteResponseContent( global::AI21.ResponseFormat? responseFormat = default, global::System.Threading.CancellationToken cancellationToken = default) { - var __request = new global::AI21.LanguageStudioApiServerDataTypesChatChatRequest + var __request = new global::AI21.ChatRequest { Model = model, Messages = messages, diff --git a/src/libs/AI21/Generated/AI21.Models.ChatMessage.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatMessage.g.cs deleted file mode 100644 index b6318c3..0000000 --- a/src/libs/AI21/Generated/AI21.Models.ChatMessage.g.cs +++ /dev/null @@ -1,55 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class ChatMessage - { - /// - /// An enumeration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.RoleTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::AI21.RoleType Role { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// An enumeration. - /// - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public ChatMessage( - global::AI21.RoleType role, - string text) - { - this.Role = role; - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - } - - /// - /// Initializes a new instance of the class. - /// - public ChatMessage() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ChatOutput.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatOutput.Json.g.cs deleted file mode 100644 index 33c0c7e..0000000 --- a/src/libs/AI21/Generated/AI21.Models.ChatOutput.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class ChatOutput - { - /// - /// 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.ChatOutput? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.ChatOutput), - jsonSerializerContext) as global::AI21.ChatOutput; - } - - /// - /// 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.ChatOutput? 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.ChatOutput), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ChatOutput; - } - - /// - /// 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.ChatOutput.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatOutput.g.cs deleted file mode 100644 index 34c0e77..0000000 --- a/src/libs/AI21/Generated/AI21.Models.ChatOutput.g.cs +++ /dev/null @@ -1,65 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class ChatOutput - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// An enumeration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.RoleTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::AI21.RoleType Role { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("finishReason")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::AI21.FinishReason FinishReason { 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 ChatOutput( - string text, - global::AI21.RoleType role, - global::AI21.FinishReason finishReason) - { - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.Role = role; - this.FinishReason = finishReason ?? throw new global::System.ArgumentNullException(nameof(finishReason)); - } - - /// - /// Initializes a new instance of the class. - /// - public ChatOutput() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ChatMessage.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatRequest.Json.g.cs similarity index 89% rename from src/libs/AI21/Generated/AI21.Models.ChatMessage.Json.g.cs rename to src/libs/AI21/Generated/AI21.Models.ChatRequest.Json.g.cs index ac2f546..c491451 100644 --- a/src/libs/AI21/Generated/AI21.Models.ChatMessage.Json.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.ChatRequest.Json.g.cs @@ -2,7 +2,7 @@ namespace AI21 { - public sealed partial class ChatMessage + public sealed partial class ChatRequest { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::AI21.ChatMessage? FromJson( + public static global::AI21.ChatRequest? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::AI21.ChatMessage), - jsonSerializerContext) as global::AI21.ChatMessage; + typeof(global::AI21.ChatRequest), + jsonSerializerContext) as global::AI21.ChatRequest; } /// @@ -51,11 +51,11 @@ public string ToJson( [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.ChatMessage? FromJson( + public static global::AI21.ChatRequest? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.ChatMessage), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ChatMessage; + typeof(global::AI21.ChatRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ChatRequest; } /// @@ -80,11 +80,11 @@ public string ToJson( [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( + 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( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatRequest.g.cs similarity index 57% rename from src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.cs rename to src/libs/AI21/Generated/AI21.Models.ChatRequest.g.cs index 4aacce5..2524ba9 100644 --- a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequest.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.ChatRequest.g.cs @@ -8,7 +8,7 @@ namespace AI21 /// /// /// - public sealed partial class LanguageStudioApiServerDataTypesChatChatRequest + public sealed partial class ChatRequest { /// /// An enumeration. @@ -19,7 +19,10 @@ public sealed partial class LanguageStudioApiServerDataTypesChatChatRequest public required global::AI21.ModelName Model { get; set; } /// - /// messages + /// The previous messages in this chat, from oldest (index 0) to newest. Messages
+ /// must be alternating `user`/`assistant` messages, optionally starting with a `system`
+ /// message. For single turn interactions, this should be an optional `system` message,
+ /// and a single `user` message. Maximum total size for the list is about 256K tokens. ///
[global::System.Text.Json.Serialization.JsonPropertyName("messages")] [global::System.Text.Json.Serialization.JsonRequired] @@ -32,31 +35,49 @@ public sealed partial class LanguageStudioApiServerDataTypesChatChatRequest public global::System.Collections.Generic.IList? Tools { get; set; } /// + /// How many chat responses to generate. _Range: 1 – 16_ **Notes:**
+ /// - If `n > 1`, setting `temperature=0` will fail because all answers are guaranteed to be duplicates.
+ /// - `n` must be 1 when `stream = True`
/// Default Value: 1 ///
[global::System.Text.Json.Serialization.JsonPropertyName("n")] public int? N { get; set; } /// + /// The maximum number of tokens to allow for each generated response message. Typically
+ /// the best way to limit output length is by providing a length limit in the system
+ /// prompt (for example, "limit your answers to three sentences"). _Range: 0 – 4096_
/// Default Value: 4096 ///
[global::System.Text.Json.Serialization.JsonPropertyName("max_tokens")] public int? MaxTokens { get; set; } /// - /// + /// How much variation to provide in each answer. Setting this value to 0 guarantees the
+ /// same response to the same question every time. Setting a higher value encourages more
+ /// variation. Modifies the distribution from which tokens are sampled.
+ /// [More information](https://docs.ai21.com/docs/sampling-from-language-models#temperature)
+ /// _Range: 0.0 – 2.0_ ///
[global::System.Text.Json.Serialization.JsonPropertyName("temperature")] public double? Temperature { get; set; } /// + /// Limit the pool of next tokens in each step to the top N percentile of possible
+ /// tokens, where 1.0 means the pool of all possible tokens, and 0.01 means the
+ /// pool of only the most likely next tokens. [More information]
+ /// (https://docs.ai21.com/docs/sampling-from-language-models#topp) _Range: 0 \<= value \<=1.0_
/// Default Value: 1 ///
[global::System.Text.Json.Serialization.JsonPropertyName("top_p")] public double? TopP { get; set; } /// - /// + /// End the message when the model generates one of these strings. The stop sequence
+ /// is not included in the generated message. Each sequence can be up to 64K long, and
+ /// can contain newlines as `\n` characters. Examples:
+ /// - Single stop string with a word and a period: "monkeys."
+ /// - Multiple stop strings and a newline: ["cat", "dog", " .", "####", "\n"] ///
[global::System.Text.Json.Serialization.JsonPropertyName("stop")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.AnyOfJsonConverter>))] @@ -98,26 +119,51 @@ public sealed partial class LanguageStudioApiServerDataTypesChatChatRequest public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// An enumeration. /// /// - /// messages + /// The previous messages in this chat, from oldest (index 0) to newest. Messages
+ /// must be alternating `user`/`assistant` messages, optionally starting with a `system`
+ /// message. For single turn interactions, this should be an optional `system` message,
+ /// and a single `user` message. Maximum total size for the list is about 256K tokens. /// /// /// + /// How many chat responses to generate. _Range: 1 – 16_ **Notes:**
+ /// - If `n > 1`, setting `temperature=0` will fail because all answers are guaranteed to be duplicates.
+ /// - `n` must be 1 when `stream = True`
/// Default Value: 1 /// /// + /// The maximum number of tokens to allow for each generated response message. Typically
+ /// the best way to limit output length is by providing a length limit in the system
+ /// prompt (for example, "limit your answers to three sentences"). _Range: 0 – 4096_
/// Default Value: 4096 /// - /// + /// + /// How much variation to provide in each answer. Setting this value to 0 guarantees the
+ /// same response to the same question every time. Setting a higher value encourages more
+ /// variation. Modifies the distribution from which tokens are sampled.
+ /// [More information](https://docs.ai21.com/docs/sampling-from-language-models#temperature)
+ /// _Range: 0.0 – 2.0_ + /// /// + /// Limit the pool of next tokens in each step to the top N percentile of possible
+ /// tokens, where 1.0 means the pool of all possible tokens, and 0.01 means the
+ /// pool of only the most likely next tokens. [More information]
+ /// (https://docs.ai21.com/docs/sampling-from-language-models#topp) _Range: 0 \<= value \<=1.0_
/// Default Value: 1 /// - /// + /// + /// End the message when the model generates one of these strings. The stop sequence
+ /// is not included in the generated message. Each sequence can be up to 64K long, and
+ /// can contain newlines as `\n` characters. Examples:
+ /// - Single stop string with a word and a period: "monkeys."
+ /// - Multiple stop strings and a newline: ["cat", "dog", " .", "####", "\n"] + /// /// /// Whether or not to stream the result one token at a time using
/// [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).
@@ -130,7 +176,7 @@ public sealed partial class LanguageStudioApiServerDataTypesChatChatRequest /// /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public LanguageStudioApiServerDataTypesChatChatRequest( + public ChatRequest( global::AI21.ModelName model, global::System.Collections.Generic.IList messages, global::System.Collections.Generic.IList? tools, @@ -159,9 +205,9 @@ public LanguageStudioApiServerDataTypesChatChatRequest( } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public LanguageStudioApiServerDataTypesChatChatRequest() + public ChatRequest() { } } diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2LargeCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatRequestMessageDiscriminator.Json.g.cs similarity index 85% rename from src/libs/AI21/Generated/AI21.Models.V1J2LargeCompleteResponse.Json.g.cs rename to src/libs/AI21/Generated/AI21.Models.ChatRequestMessageDiscriminator.Json.g.cs index 33fc6de..bc65cb6 100644 --- a/src/libs/AI21/Generated/AI21.Models.V1J2LargeCompleteResponse.Json.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.ChatRequestMessageDiscriminator.Json.g.cs @@ -2,7 +2,7 @@ namespace AI21 { - public sealed partial class V1J2LargeCompleteResponse + public sealed partial class ChatRequestMessageDiscriminator { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::AI21.V1J2LargeCompleteResponse? FromJson( + public static global::AI21.ChatRequestMessageDiscriminator? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::AI21.V1J2LargeCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2LargeCompleteResponse; + typeof(global::AI21.ChatRequestMessageDiscriminator), + jsonSerializerContext) as global::AI21.ChatRequestMessageDiscriminator; } /// @@ -51,11 +51,11 @@ public string ToJson( [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.V1J2LargeCompleteResponse? FromJson( + public static global::AI21.ChatRequestMessageDiscriminator? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.V1J2LargeCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2LargeCompleteResponse; + typeof(global::AI21.ChatRequestMessageDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ChatRequestMessageDiscriminator; } /// @@ -80,11 +80,11 @@ public string ToJson( [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( + 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( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatRequestMessageDiscriminator.g.cs similarity index 51% rename from src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator.g.cs rename to src/libs/AI21/Generated/AI21.Models.ChatRequestMessageDiscriminator.g.cs index cd9849b..667a783 100644 --- a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.ChatRequestMessageDiscriminator.g.cs @@ -6,14 +6,14 @@ namespace AI21 /// /// /// - public sealed partial class LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator + public sealed partial class ChatRequestMessageDiscriminator { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("role")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleJsonConverter))] - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? Role { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.ChatRequestMessageDiscriminatorRoleJsonConverter))] + public global::AI21.ChatRequestMessageDiscriminatorRole? Role { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -22,20 +22,20 @@ public sealed partial class LanguageStudioApiServerDataTypesChatChatRequestMessa public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator( - global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? role) + public ChatRequestMessageDiscriminator( + global::AI21.ChatRequestMessageDiscriminatorRole? role) { this.Role = role; } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator() + public ChatRequestMessageDiscriminator() { } } diff --git a/src/libs/AI21/Generated/AI21.Models.ChatRequestMessageDiscriminatorRole.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatRequestMessageDiscriminatorRole.g.cs new file mode 100644 index 0000000..15c3bff --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.ChatRequestMessageDiscriminatorRole.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public enum ChatRequestMessageDiscriminatorRole + { + /// + /// + /// + User, + /// + /// + /// + Assistant, + /// + /// + /// + Tool, + /// + /// + /// + System, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ChatRequestMessageDiscriminatorRoleExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ChatRequestMessageDiscriminatorRole value) + { + return value switch + { + ChatRequestMessageDiscriminatorRole.User => "user", + ChatRequestMessageDiscriminatorRole.Assistant => "assistant", + ChatRequestMessageDiscriminatorRole.Tool => "tool", + ChatRequestMessageDiscriminatorRole.System => "system", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ChatRequestMessageDiscriminatorRole? ToEnum(string value) + { + return value switch + { + "user" => ChatRequestMessageDiscriminatorRole.User, + "assistant" => ChatRequestMessageDiscriminatorRole.Assistant, + "tool" => ChatRequestMessageDiscriminatorRole.Tool, + "system" => ChatRequestMessageDiscriminatorRole.System, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ChatResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatResponse.Json.g.cs deleted file mode 100644 index b0522d9..0000000 --- a/src/libs/AI21/Generated/AI21.Models.ChatResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class ChatResponse - { - /// - /// 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.ChatResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.ChatResponse), - jsonSerializerContext) as global::AI21.ChatResponse; - } - - /// - /// 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.ChatResponse? 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.ChatResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ChatResponse; - } - - /// - /// 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.ChatResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatResponse.g.cs deleted file mode 100644 index 0dd42f8..0000000 --- a/src/libs/AI21/Generated/AI21.Models.ChatResponse.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class ChatResponse - { - /// - /// A unique ID for the request (not the message). Repeated identical requests
- /// get different IDs. However, for a streaming response, the ID will be the same
- /// for all responses in the stream. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("outputs")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Outputs { 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. - /// - /// - /// A unique ID for the request (not the message). Repeated identical requests
- /// get different IDs. However, for a streaming response, the ID will be the same
- /// for all responses in the stream. - /// - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public ChatResponse( - string id, - global::System.Collections.Generic.IList outputs) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Outputs = outputs ?? throw new global::System.ArgumentNullException(nameof(outputs)); - } - - /// - /// Initializes a new instance of the class. - /// - public ChatResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.DocumentType.g.cs b/src/libs/AI21/Generated/AI21.Models.DocumentType.g.cs deleted file mode 100644 index 2994f33..0000000 --- a/src/libs/AI21/Generated/AI21.Models.DocumentType.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// An enumeration. - /// - public enum DocumentType - { - /// - /// - /// - URL, - /// - /// - /// - TEXT, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class DocumentTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this DocumentType value) - { - return value switch - { - DocumentType.URL => "URL", - DocumentType.TEXT => "TEXT", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static DocumentType? ToEnum(string value) - { - return value switch - { - "URL" => DocumentType.URL, - "TEXT" => DocumentType.TEXT, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.FinishReason.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.FinishReason.Json.g.cs deleted file mode 100644 index 770a262..0000000 --- a/src/libs/AI21/Generated/AI21.Models.FinishReason.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class FinishReason - { - /// - /// 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.FinishReason? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.FinishReason), - jsonSerializerContext) as global::AI21.FinishReason; - } - - /// - /// 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.FinishReason? 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.FinishReason), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.FinishReason; - } - - /// - /// 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.FinishReason.g.cs b/src/libs/AI21/Generated/AI21.Models.FinishReason.g.cs deleted file mode 100644 index f23771c..0000000 --- a/src/libs/AI21/Generated/AI21.Models.FinishReason.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class FinishReason - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("reason")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Reason { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("length")] - public int? Length { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("sequence")] - public string? Sequence { 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 FinishReason( - string reason, - int? length, - string? sequence) - { - this.Reason = reason ?? throw new global::System.ArgumentNullException(nameof(reason)); - this.Length = length; - this.Sequence = sequence; - } - - /// - /// Initializes a new instance of the class. - /// - public FinishReason() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.Highlight.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.Highlight.Json.g.cs deleted file mode 100644 index a72bfd9..0000000 --- a/src/libs/AI21/Generated/AI21.Models.Highlight.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class Highlight - { - /// - /// 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.Highlight? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.Highlight), - jsonSerializerContext) as global::AI21.Highlight; - } - - /// - /// 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.Highlight? 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.Highlight), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.Highlight; - } - - /// - /// 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.Highlight.g.cs b/src/libs/AI21/Generated/AI21.Models.Highlight.g.cs deleted file mode 100644 index 653f369..0000000 --- a/src/libs/AI21/Generated/AI21.Models.Highlight.g.cs +++ /dev/null @@ -1,62 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class Highlight - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("startIndex")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int StartIndex { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("endIndex")] - [global::System.Text.Json.Serialization.JsonRequired] - public required int EndIndex { 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 Highlight( - string text, - int startIndex, - int endIndex) - { - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.StartIndex = startIndex; - this.EndIndex = endIndex; - } - - /// - /// Initializes a new instance of the class. - /// - public Highlight() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequest.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequest.Json.g.cs deleted file mode 100644 index 12aa999..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class LanguageStudioApiServerDataTypesChatChatRequest - { - /// - /// 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.LanguageStudioApiServerDataTypesChatChatRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.LanguageStudioApiServerDataTypesChatChatRequest), - jsonSerializerContext) as global::AI21.LanguageStudioApiServerDataTypesChatChatRequest; - } - - /// - /// 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.LanguageStudioApiServerDataTypesChatChatRequest? 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.LanguageStudioApiServerDataTypesChatChatRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LanguageStudioApiServerDataTypesChatChatRequest; - } - - /// - /// 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.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator.Json.g.cs deleted file mode 100644 index 74dc972..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator - { - /// - /// 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.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator), - jsonSerializerContext) as global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator; - } - - /// - /// 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.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator? 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.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator; - } - - /// - /// 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.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.g.cs deleted file mode 100644 index f6786ad..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.g.cs +++ /dev/null @@ -1,63 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public enum LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole - { - /// - /// - /// - User, - /// - /// - /// - Assistant, - /// - /// - /// - Tool, - /// - /// - /// - System, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole value) - { - return value switch - { - LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.User => "user", - LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.Assistant => "assistant", - LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.Tool => "tool", - LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.System => "system", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? ToEnum(string value) - { - return value switch - { - "user" => LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.User, - "assistant" => LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.Assistant, - "tool" => LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.Tool, - "system" => LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.System, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.Json.g.cs deleted file mode 100644 index 8c165a6..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class LanguageStudioApiServerDataTypesJ2ChatChatRequest - { - /// - /// 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.LanguageStudioApiServerDataTypesJ2ChatChatRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest), - jsonSerializerContext) as global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest; - } - - /// - /// 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.LanguageStudioApiServerDataTypesJ2ChatChatRequest? 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.LanguageStudioApiServerDataTypesJ2ChatChatRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest; - } - - /// - /// 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.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.cs deleted file mode 100644 index 7e0c3b8..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesJ2ChatChatRequest.g.cs +++ /dev/null @@ -1,156 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// This class is to be used as a common class to all Studio API requests payloads - /// - public sealed partial class LanguageStudioApiServerDataTypesJ2ChatChatRequest - { - /// - /// messages - /// - [global::System.Text.Json.Serialization.JsonPropertyName("messages")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Messages { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("system")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string System { 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; } - - /// - /// Default Value: 1 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("numResults")] - public int? NumResults { get; set; } - - /// - /// Default Value: 0.7 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] - public double? Temperature { get; set; } - - /// - /// Default Value: 300 - /// - [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("topP")] - public double? TopP { get; set; } - - /// - /// Default Value: 0 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("topKReturn")] - public int? TopKReturn { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("stopSequences")] - public global::System.Collections.Generic.IList? StopSequences { 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. - /// - /// - /// messages - /// - /// - /// - /// - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0.7 - /// - /// - /// Default Value: 300 - /// - /// - /// Default Value: 0 - /// - /// - /// Default Value: 1 - /// - /// - /// Default Value: 0 - /// - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public LanguageStudioApiServerDataTypesJ2ChatChatRequest( - global::System.Collections.Generic.IList messages, - string system, - global::AI21.Penalty? frequencyPenalty, - global::AI21.Penalty? presencePenalty, - global::AI21.Penalty? countPenalty, - int? numResults, - double? temperature, - int? maxTokens, - int? minTokens, - double? topP, - int? topKReturn, - global::System.Collections.Generic.IList? stopSequences) - { - this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages)); - this.System = system ?? throw new global::System.ArgumentNullException(nameof(system)); - this.FrequencyPenalty = frequencyPenalty; - this.PresencePenalty = presencePenalty; - this.CountPenalty = countPenalty; - this.NumResults = numResults; - this.Temperature = temperature; - this.MaxTokens = maxTokens; - this.MinTokens = minTokens; - this.TopP = topP; - this.TopKReturn = topKReturn; - this.StopSequences = stopSequences; - } - - /// - /// Initializes a new instance of the class. - /// - public LanguageStudioApiServerDataTypesJ2ChatChatRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.MessagesItem.g.cs b/src/libs/AI21/Generated/AI21.Models.MessagesItem.g.cs index 61a0d8e..7485015 100644 --- a/src/libs/AI21/Generated/AI21.Models.MessagesItem.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.MessagesItem.g.cs @@ -12,7 +12,7 @@ namespace AI21 /// /// /// - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? Role { get; } + public global::AI21.ChatRequestMessageDiscriminatorRole? Role { get; } /// /// @@ -158,7 +158,7 @@ public MessagesItem(global::AI21.SystemMessage? value) /// /// public MessagesItem( - global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? role, + global::AI21.ChatRequestMessageDiscriminatorRole? role, global::AI21.UserMessage? user, global::AI21.AssistantMessage? assistant, global::AI21.ToolMessage? tool, diff --git a/src/libs/AI21/Generated/AI21.Models.ParaphraseBody.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.ParaphraseBody.Json.g.cs deleted file mode 100644 index e1ccd8c..0000000 --- a/src/libs/AI21/Generated/AI21.Models.ParaphraseBody.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class ParaphraseBody - { - /// - /// 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.ParaphraseBody? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.ParaphraseBody), - jsonSerializerContext) as global::AI21.ParaphraseBody; - } - - /// - /// 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.ParaphraseBody? 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.ParaphraseBody), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ParaphraseBody; - } - - /// - /// 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.ParaphraseBody.g.cs b/src/libs/AI21/Generated/AI21.Models.ParaphraseBody.g.cs deleted file mode 100644 index c0e3a6f..0000000 --- a/src/libs/AI21/Generated/AI21.Models.ParaphraseBody.g.cs +++ /dev/null @@ -1,74 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// This class is to be used as a common class to all Studio API requests payloads - /// - public sealed partial class ParaphraseBody - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// Default Value: general - /// - [global::System.Text.Json.Serialization.JsonPropertyName("style")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.StyleTypeJsonConverter))] - public global::AI21.StyleType? Style { get; set; } - - /// - /// Default Value: 0 - /// - [global::System.Text.Json.Serialization.JsonPropertyName("startIndex")] - public int? StartIndex { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("endIndex")] - public int? EndIndex { 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: general - /// - /// - /// Default Value: 0 - /// - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public ParaphraseBody( - string text, - global::AI21.StyleType? style, - int? startIndex, - int? endIndex) - { - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.Style = style; - this.StartIndex = startIndex; - this.EndIndex = endIndex; - } - - /// - /// Initializes a new instance of the class. - /// - public ParaphraseBody() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.RoleType.g.cs b/src/libs/AI21/Generated/AI21.Models.RoleType.g.cs deleted file mode 100644 index 9381e1c..0000000 --- a/src/libs/AI21/Generated/AI21.Models.RoleType.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// An enumeration. - /// - public enum RoleType - { - /// - /// - /// - User, - /// - /// - /// - Assistant, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class RoleTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this RoleType value) - { - return value switch - { - RoleType.User => "user", - RoleType.Assistant => "assistant", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static RoleType? ToEnum(string value) - { - return value switch - { - "user" => RoleType.User, - "assistant" => RoleType.Assistant, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.Segment.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.Segment.Json.g.cs deleted file mode 100644 index 8f2e715..0000000 --- a/src/libs/AI21/Generated/AI21.Models.Segment.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class Segment - { - /// - /// 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.Segment? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.Segment), - jsonSerializerContext) as global::AI21.Segment; - } - - /// - /// 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.Segment? 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.Segment), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.Segment; - } - - /// - /// 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.Segment.g.cs b/src/libs/AI21/Generated/AI21.Models.Segment.g.cs deleted file mode 100644 index 386d7e5..0000000 --- a/src/libs/AI21/Generated/AI21.Models.Segment.g.cs +++ /dev/null @@ -1,52 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class Segment - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("segmentText")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string SegmentText { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("segmentType")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string SegmentType { 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 Segment( - string segmentText, - string segmentType) - { - this.SegmentText = segmentText ?? throw new global::System.ArgumentNullException(nameof(segmentText)); - this.SegmentType = segmentType ?? throw new global::System.ArgumentNullException(nameof(segmentType)); - } - - /// - /// Initializes a new instance of the class. - /// - public Segment() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.SegmentSummary.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.SegmentSummary.Json.g.cs deleted file mode 100644 index 9b206aa..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SegmentSummary.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class SegmentSummary - { - /// - /// 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.SegmentSummary? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.SegmentSummary), - jsonSerializerContext) as global::AI21.SegmentSummary; - } - - /// - /// 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.SegmentSummary? 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.SegmentSummary), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.SegmentSummary; - } - - /// - /// 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.SegmentSummary.g.cs b/src/libs/AI21/Generated/AI21.Models.SegmentSummary.g.cs deleted file mode 100644 index 6f5a648..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SegmentSummary.g.cs +++ /dev/null @@ -1,90 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class SegmentSummary - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("summary")] - public string? Summary { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("segmentText")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string SegmentText { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("segmentHtml")] - public string? SegmentHtml { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("segmentType")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string SegmentType { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("hasSummary")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool HasSummary { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("highlights")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Highlights { 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 SegmentSummary( - string segmentText, - string segmentType, - bool hasSummary, - global::System.Collections.Generic.IList highlights, - string? summary, - string? segmentHtml) - { - this.SegmentText = segmentText ?? throw new global::System.ArgumentNullException(nameof(segmentText)); - this.SegmentType = segmentType ?? throw new global::System.ArgumentNullException(nameof(segmentType)); - this.HasSummary = hasSummary; - this.Highlights = highlights ?? throw new global::System.ArgumentNullException(nameof(highlights)); - this.Summary = summary; - this.SegmentHtml = segmentHtml; - } - - /// - /// Initializes a new instance of the class. - /// - public SegmentSummary() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.SegmentationBody.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.SegmentationBody.Json.g.cs deleted file mode 100644 index 69e25fb..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SegmentationBody.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class SegmentationBody - { - /// - /// 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.SegmentationBody? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.SegmentationBody), - jsonSerializerContext) as global::AI21.SegmentationBody; - } - - /// - /// 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.SegmentationBody? 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.SegmentationBody), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.SegmentationBody; - } - - /// - /// 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.SegmentationBody.g.cs b/src/libs/AI21/Generated/AI21.Models.SegmentationBody.g.cs deleted file mode 100644 index c7a7546..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SegmentationBody.g.cs +++ /dev/null @@ -1,55 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// This class is to be used as a common class to all Studio API requests payloads - /// - public sealed partial class SegmentationBody - { - /// - /// An enumeration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("sourceType")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.DocumentTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::AI21.DocumentType SourceType { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("source")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Source { 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 SegmentationBody( - global::AI21.DocumentType sourceType, - string source) - { - this.SourceType = sourceType; - this.Source = source ?? throw new global::System.ArgumentNullException(nameof(source)); - } - - /// - /// Initializes a new instance of the class. - /// - public SegmentationBody() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.SegmentationResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.SegmentationResponse.Json.g.cs deleted file mode 100644 index 743aacb..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SegmentationResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class SegmentationResponse - { - /// - /// 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.SegmentationResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.SegmentationResponse), - jsonSerializerContext) as global::AI21.SegmentationResponse; - } - - /// - /// 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.SegmentationResponse? 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.SegmentationResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.SegmentationResponse; - } - - /// - /// 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.SegmentationResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.SegmentationResponse.g.cs deleted file mode 100644 index 42c1c30..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SegmentationResponse.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class SegmentationResponse - { - /// - /// A unique ID for the request (not the message). Repeated identical requests
- /// get different IDs. However, for a streaming response, the ID will be the same
- /// for all responses in the stream. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("segments")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Segments { 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. - /// - /// - /// A unique ID for the request (not the message). Repeated identical requests
- /// get different IDs. However, for a streaming response, the ID will be the same
- /// for all responses in the stream. - /// - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public SegmentationResponse( - string id, - global::System.Collections.Generic.IList segments) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Segments = segments ?? throw new global::System.ArgumentNullException(nameof(segments)); - } - - /// - /// Initializes a new instance of the class. - /// - public SegmentationResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.SegmentedSummaryBody.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.SegmentedSummaryBody.Json.g.cs deleted file mode 100644 index 1f1837a..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SegmentedSummaryBody.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class SegmentedSummaryBody - { - /// - /// 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.SegmentedSummaryBody? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.SegmentedSummaryBody), - jsonSerializerContext) as global::AI21.SegmentedSummaryBody; - } - - /// - /// 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.SegmentedSummaryBody? 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.SegmentedSummaryBody), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.SegmentedSummaryBody; - } - - /// - /// 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.SegmentedSummaryBody.g.cs b/src/libs/AI21/Generated/AI21.Models.SegmentedSummaryBody.g.cs deleted file mode 100644 index 41f22a0..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SegmentedSummaryBody.g.cs +++ /dev/null @@ -1,64 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// This class is to be used as a common class to all Studio API requests payloads - /// - public sealed partial class SegmentedSummaryBody - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("source")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Source { get; set; } - - /// - /// An enumeration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("sourceType")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.DocumentTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::AI21.DocumentType SourceType { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("focus")] - public string? Focus { 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 SegmentedSummaryBody( - string source, - global::AI21.DocumentType sourceType, - string? focus) - { - this.Source = source ?? throw new global::System.ArgumentNullException(nameof(source)); - this.SourceType = sourceType; - this.Focus = focus; - } - - /// - /// Initializes a new instance of the class. - /// - public SegmentedSummaryBody() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.StyleType.g.cs b/src/libs/AI21/Generated/AI21.Models.StyleType.g.cs deleted file mode 100644 index bc5860a..0000000 --- a/src/libs/AI21/Generated/AI21.Models.StyleType.g.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// An enumeration. - /// - public enum StyleType - { - /// - /// - /// - Long, - /// - /// - /// - Short, - /// - /// - /// - Formal, - /// - /// - /// - Casual, - /// - /// - /// - General, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class StyleTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this StyleType value) - { - return value switch - { - StyleType.Long => "long", - StyleType.Short => "short", - StyleType.Formal => "formal", - StyleType.Casual => "casual", - StyleType.General => "general", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static StyleType? ToEnum(string value) - { - return value switch - { - "long" => StyleType.Long, - "short" => StyleType.Short, - "formal" => StyleType.Formal, - "casual" => StyleType.Casual, - "general" => StyleType.General, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.SummarizationResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.SummarizationResponse.Json.g.cs deleted file mode 100644 index e49ddf1..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SummarizationResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class SummarizationResponse - { - /// - /// 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.SummarizationResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.SummarizationResponse), - jsonSerializerContext) as global::AI21.SummarizationResponse; - } - - /// - /// 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.SummarizationResponse? 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.SummarizationResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.SummarizationResponse; - } - - /// - /// 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.SummarizationResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.SummarizationResponse.g.cs deleted file mode 100644 index 01716f7..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SummarizationResponse.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class SummarizationResponse - { - /// - /// A unique ID for the request (not the message). Repeated identical requests
- /// get different IDs. However, for a streaming response, the ID will be the same
- /// for all responses in the stream. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("summary")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Summary { 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. - /// - /// - /// A unique ID for the request (not the message). Repeated identical requests
- /// get different IDs. However, for a streaming response, the ID will be the same
- /// for all responses in the stream. - /// - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public SummarizationResponse( - string id, - string summary) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Summary = summary ?? throw new global::System.ArgumentNullException(nameof(summary)); - } - - /// - /// Initializes a new instance of the class. - /// - public SummarizationResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.SummarizeBody.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.SummarizeBody.Json.g.cs deleted file mode 100644 index c84603b..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SummarizeBody.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class SummarizeBody - { - /// - /// 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.SummarizeBody? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.SummarizeBody), - jsonSerializerContext) as global::AI21.SummarizeBody; - } - - /// - /// 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.SummarizeBody? 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.SummarizeBody), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.SummarizeBody; - } - - /// - /// 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.SummarizeBody.g.cs b/src/libs/AI21/Generated/AI21.Models.SummarizeBody.g.cs deleted file mode 100644 index e84efab..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SummarizeBody.g.cs +++ /dev/null @@ -1,76 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// This class is to be used as a common class to all Studio API requests payloads - /// - public sealed partial class SummarizeBody - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("source")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Source { get; set; } - - /// - /// An enumeration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("sourceType")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.DocumentTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::AI21.DocumentType SourceType { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("focus")] - public string? Focus { get; set; } - - /// - /// An enumeration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("summaryMethod")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.SummaryMethodJsonConverter))] - public global::AI21.SummaryMethod? SummaryMethod { 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. - /// - /// - /// - /// An enumeration. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public SummarizeBody( - string source, - global::AI21.DocumentType sourceType, - string? focus, - global::AI21.SummaryMethod? summaryMethod) - { - this.Source = source ?? throw new global::System.ArgumentNullException(nameof(source)); - this.SourceType = sourceType; - this.Focus = focus; - this.SummaryMethod = summaryMethod; - } - - /// - /// Initializes a new instance of the class. - /// - public SummarizeBody() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.SummarizeBySegmentResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.SummarizeBySegmentResponse.Json.g.cs deleted file mode 100644 index 614c79f..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SummarizeBySegmentResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class SummarizeBySegmentResponse - { - /// - /// 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.SummarizeBySegmentResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.SummarizeBySegmentResponse), - jsonSerializerContext) as global::AI21.SummarizeBySegmentResponse; - } - - /// - /// 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.SummarizeBySegmentResponse? 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.SummarizeBySegmentResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.SummarizeBySegmentResponse; - } - - /// - /// 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.SummarizeBySegmentResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.SummarizeBySegmentResponse.g.cs deleted file mode 100644 index 78ac502..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SummarizeBySegmentResponse.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class SummarizeBySegmentResponse - { - /// - /// A unique ID for the request (not the message). Repeated identical requests
- /// get different IDs. However, for a streaming response, the ID will be the same
- /// for all responses in the stream. - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Id { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("segments")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Segments { 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. - /// - /// - /// A unique ID for the request (not the message). Repeated identical requests
- /// get different IDs. However, for a streaming response, the ID will be the same
- /// for all responses in the stream. - /// - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public SummarizeBySegmentResponse( - string id, - global::System.Collections.Generic.IList segments) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Segments = segments ?? throw new global::System.ArgumentNullException(nameof(segments)); - } - - /// - /// Initializes a new instance of the class. - /// - public SummarizeBySegmentResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.SummaryMethod.g.cs b/src/libs/AI21/Generated/AI21.Models.SummaryMethod.g.cs deleted file mode 100644 index ecd8252..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SummaryMethod.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// An enumeration. - /// - public enum SummaryMethod - { - /// - /// - /// - Segments, - /// - /// - /// - Guided, - /// - /// - /// - FullDocument, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class SummaryMethodExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this SummaryMethod value) - { - return value switch - { - SummaryMethod.Segments => "segments", - SummaryMethod.Guided => "guided", - SummaryMethod.FullDocument => "fullDocument", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static SummaryMethod? ToEnum(string value) - { - return value switch - { - "segments" => SummaryMethod.Segments, - "guided" => SummaryMethod.Guided, - "fullDocument" => SummaryMethod.FullDocument, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2GrandeCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2GrandeCompleteResponse.Json.g.cs deleted file mode 100644 index c654865..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2GrandeCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2GrandeCompleteResponse - { - /// - /// 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.V1J2GrandeCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2GrandeCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2GrandeCompleteResponse; - } - - /// - /// 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.V1J2GrandeCompleteResponse? 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.V1J2GrandeCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2GrandeCompleteResponse; - } - - /// - /// 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.V1J2GrandeCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2GrandeCompleteResponse.g.cs deleted file mode 100644 index 111284e..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2GrandeCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2GrandeCompleteResponse - { - - /// - /// 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 V1J2GrandeCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2GrandeInstructCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2GrandeInstructCompleteResponse.Json.g.cs deleted file mode 100644 index 021d3fd..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2GrandeInstructCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2GrandeInstructCompleteResponse - { - /// - /// 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.V1J2GrandeInstructCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2GrandeInstructCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2GrandeInstructCompleteResponse; - } - - /// - /// 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.V1J2GrandeInstructCompleteResponse? 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.V1J2GrandeInstructCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2GrandeInstructCompleteResponse; - } - - /// - /// 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.V1J2GrandeInstructCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2GrandeInstructCompleteResponse.g.cs deleted file mode 100644 index 1d6184b..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2GrandeInstructCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2GrandeInstructCompleteResponse - { - - /// - /// 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 V1J2GrandeInstructCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse2.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse2.Json.g.cs deleted file mode 100644 index 8c6d91f..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2JumboCompleteResponse2 - { - /// - /// 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.V1J2JumboCompleteResponse2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2JumboCompleteResponse2), - jsonSerializerContext) as global::AI21.V1J2JumboCompleteResponse2; - } - - /// - /// 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.V1J2JumboCompleteResponse2? 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.V1J2JumboCompleteResponse2), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2JumboCompleteResponse2; - } - - /// - /// 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.V1J2JumboCompleteResponse2.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse2.g.cs deleted file mode 100644 index 127dfe8..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2JumboCompleteResponse2.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2JumboCompleteResponse2 - { - - /// - /// 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 V1J2JumboCompleteResponse2( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2JumboInstructCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2JumboInstructCompleteResponse.Json.g.cs deleted file mode 100644 index d4c9f52..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2JumboInstructCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2JumboInstructCompleteResponse - { - /// - /// 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.V1J2JumboInstructCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2JumboInstructCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2JumboInstructCompleteResponse; - } - - /// - /// 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.V1J2JumboInstructCompleteResponse? 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.V1J2JumboInstructCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2JumboInstructCompleteResponse; - } - - /// - /// 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.V1J2JumboInstructCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2JumboInstructCompleteResponse.g.cs deleted file mode 100644 index 72302e7..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2JumboInstructCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2JumboInstructCompleteResponse - { - - /// - /// 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 V1J2JumboInstructCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2LargeCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2LargeCompleteResponse.g.cs deleted file mode 100644 index 7df9b19..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2LargeCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2LargeCompleteResponse - { - - /// - /// 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 V1J2LargeCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2LargeInstructCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2LargeInstructCompleteResponse.Json.g.cs deleted file mode 100644 index fec6bb6..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2LargeInstructCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2LargeInstructCompleteResponse - { - /// - /// 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.V1J2LargeInstructCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2LargeInstructCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2LargeInstructCompleteResponse; - } - - /// - /// 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.V1J2LargeInstructCompleteResponse? 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.V1J2LargeInstructCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2LargeInstructCompleteResponse; - } - - /// - /// 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.V1J2LargeInstructCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2LargeInstructCompleteResponse.g.cs deleted file mode 100644 index be3de68..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2LargeInstructCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2LargeInstructCompleteResponse - { - - /// - /// 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 V1J2LargeInstructCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2LightCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2LightCompleteResponse.Json.g.cs deleted file mode 100644 index d4f96c9..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2LightCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2LightCompleteResponse - { - /// - /// 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.V1J2LightCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2LightCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2LightCompleteResponse; - } - - /// - /// 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.V1J2LightCompleteResponse? 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.V1J2LightCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2LightCompleteResponse; - } - - /// - /// 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.V1J2LightCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2LightCompleteResponse.g.cs deleted file mode 100644 index cdbbdce..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2LightCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2LightCompleteResponse - { - - /// - /// 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 V1J2LightCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2MidCompleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2MidCompleteResponse.Json.g.cs deleted file mode 100644 index 68a984c..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2MidCompleteResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2MidCompleteResponse - { - /// - /// 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.V1J2MidCompleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2MidCompleteResponse), - jsonSerializerContext) as global::AI21.V1J2MidCompleteResponse; - } - - /// - /// 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.V1J2MidCompleteResponse? 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.V1J2MidCompleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2MidCompleteResponse; - } - - /// - /// 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.V1J2MidCompleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2MidCompleteResponse.g.cs deleted file mode 100644 index 4bf5587..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2MidCompleteResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2MidCompleteResponse - { - - /// - /// 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 V1J2MidCompleteResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse2.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse2.Json.g.cs deleted file mode 100644 index 7bec27c..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse2.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1J2UltraCompleteResponse2 - { - /// - /// 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.V1J2UltraCompleteResponse2? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1J2UltraCompleteResponse2), - jsonSerializerContext) as global::AI21.V1J2UltraCompleteResponse2; - } - - /// - /// 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.V1J2UltraCompleteResponse2? 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.V1J2UltraCompleteResponse2), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1J2UltraCompleteResponse2; - } - - /// - /// 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.V1J2UltraCompleteResponse2.g.cs b/src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse2.g.cs deleted file mode 100644 index 7a64e26..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1J2UltraCompleteResponse2.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1J2UltraCompleteResponse2 - { - - /// - /// 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 V1J2UltraCompleteResponse2( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.V1ParaphrazeResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1ParaphrazeResponse.Json.g.cs deleted file mode 100644 index c683846..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1ParaphrazeResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class V1ParaphrazeResponse - { - /// - /// 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.V1ParaphrazeResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.V1ParaphrazeResponse), - jsonSerializerContext) as global::AI21.V1ParaphrazeResponse; - } - - /// - /// 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.V1ParaphrazeResponse? 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.V1ParaphrazeResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1ParaphrazeResponse; - } - - /// - /// 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.V1ParaphrazeResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1ParaphrazeResponse.g.cs deleted file mode 100644 index b4e8a89..0000000 --- a/src/libs/AI21/Generated/AI21.Models.V1ParaphrazeResponse.g.cs +++ /dev/null @@ -1,27 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class V1ParaphrazeResponse - { - - /// - /// 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 V1ParaphrazeResponse( - ) - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ParaphraseClient.V1Paraphraze.g.cs b/src/libs/AI21/Generated/AI21.ParaphraseClient.V1Paraphraze.g.cs deleted file mode 100644 index 0e9104d..0000000 --- a/src/libs/AI21/Generated/AI21.ParaphraseClient.V1Paraphraze.g.cs +++ /dev/null @@ -1,229 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class ParaphraseClient - { - partial void PrepareV1ParaphrazeArguments( - global::System.Net.Http.HttpClient httpClient, - ref int? requestStartTime, - global::AI21.ParaphraseBody request); - partial void PrepareV1ParaphrazeRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - int? requestStartTime, - global::AI21.ParaphraseBody request); - partial void ProcessV1ParaphrazeResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1ParaphrazeResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Paraphrase - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1ParaphrazeAsync( - global::AI21.ParaphraseBody request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1ParaphrazeArguments( - httpClient: HttpClient, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/paraphrase", - 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); - PrepareV1ParaphrazeRequest( - 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); - ProcessV1ParaphrazeResponse( - 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); - ProcessV1ParaphrazeResponseContent( - 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; - } - } - - /// - /// Paraphrase - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// Default Value: general - /// - /// - /// Default Value: 0 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1ParaphrazeAsync( - string text, - int? requestStartTime = default, - global::AI21.StyleType? style = default, - int? startIndex = default, - int? endIndex = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.ParaphraseBody - { - Text = text, - Style = style, - StartIndex = startIndex, - EndIndex = endIndex, - }; - - return await V1ParaphrazeAsync( - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.ParaphraseClient.g.cs b/src/libs/AI21/Generated/AI21.ParaphraseClient.g.cs deleted file mode 100644 index fef7431..0000000 --- a/src/libs/AI21/Generated/AI21.ParaphraseClient.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 ParaphraseClient : global::AI21.IParaphraseClient, 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 ParaphraseClient. - /// 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 ParaphraseClient( - 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.SegmentationClient.V1Segmentation.g.cs b/src/libs/AI21/Generated/AI21.SegmentationClient.V1Segmentation.g.cs deleted file mode 100644 index 1681121..0000000 --- a/src/libs/AI21/Generated/AI21.SegmentationClient.V1Segmentation.g.cs +++ /dev/null @@ -1,225 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class SegmentationClient - { - partial void PrepareV1SegmentationArguments( - global::System.Net.Http.HttpClient httpClient, - ref int? requestStartTime, - global::AI21.SegmentationBody request); - partial void PrepareV1SegmentationRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - int? requestStartTime, - global::AI21.SegmentationBody request); - partial void ProcessV1SegmentationResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1SegmentationResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Segmentation - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1SegmentationAsync( - global::AI21.SegmentationBody request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1SegmentationArguments( - httpClient: HttpClient, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/segmentation", - 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); - PrepareV1SegmentationRequest( - 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); - ProcessV1SegmentationResponse( - 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); - ProcessV1SegmentationResponseContent( - 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 - global::AI21.SegmentationResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__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), - }; - } - - using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - return - await global::AI21.SegmentationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - } - - /// - /// Segmentation - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// An enumeration. - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1SegmentationAsync( - global::AI21.DocumentType sourceType, - string source, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.SegmentationBody - { - SourceType = sourceType, - Source = source, - }; - - return await V1SegmentationAsync( - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.SegmentationClient.g.cs b/src/libs/AI21/Generated/AI21.SegmentationClient.g.cs deleted file mode 100644 index 40f6e70..0000000 --- a/src/libs/AI21/Generated/AI21.SegmentationClient.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 SegmentationClient : global::AI21.ISegmentationClient, 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 SegmentationClient. - /// 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 SegmentationClient( - 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.SummarizeClient.V1Summarize.g.cs b/src/libs/AI21/Generated/AI21.SummarizeClient.V1Summarize.g.cs deleted file mode 100644 index 1ecc8a0..0000000 --- a/src/libs/AI21/Generated/AI21.SummarizeClient.V1Summarize.g.cs +++ /dev/null @@ -1,233 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class SummarizeClient - { - partial void PrepareV1SummarizeArguments( - global::System.Net.Http.HttpClient httpClient, - ref int? requestStartTime, - global::AI21.SummarizeBody request); - partial void PrepareV1SummarizeRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - int? requestStartTime, - global::AI21.SummarizeBody request); - partial void ProcessV1SummarizeResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1SummarizeResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Summarize - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1SummarizeAsync( - global::AI21.SummarizeBody request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1SummarizeArguments( - httpClient: HttpClient, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/summarize", - 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); - PrepareV1SummarizeRequest( - 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); - ProcessV1SummarizeResponse( - 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); - ProcessV1SummarizeResponseContent( - 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 - global::AI21.SummarizationResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__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), - }; - } - - using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - return - await global::AI21.SummarizationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - } - - /// - /// Summarize - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// An enumeration. - /// - /// - /// - /// An enumeration. - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1SummarizeAsync( - string source, - global::AI21.DocumentType sourceType, - int? requestStartTime = default, - string? focus = default, - global::AI21.SummaryMethod? summaryMethod = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.SummarizeBody - { - Source = source, - SourceType = sourceType, - Focus = focus, - SummaryMethod = summaryMethod, - }; - - return await V1SummarizeAsync( - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.SummarizeClient.V1SummarizeBySegment.g.cs b/src/libs/AI21/Generated/AI21.SummarizeClient.V1SummarizeBySegment.g.cs deleted file mode 100644 index 5dc373c..0000000 --- a/src/libs/AI21/Generated/AI21.SummarizeClient.V1SummarizeBySegment.g.cs +++ /dev/null @@ -1,228 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class SummarizeClient - { - partial void PrepareV1SummarizeBySegmentArguments( - global::System.Net.Http.HttpClient httpClient, - ref int? requestStartTime, - global::AI21.SegmentedSummaryBody request); - partial void PrepareV1SummarizeBySegmentRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - int? requestStartTime, - global::AI21.SegmentedSummaryBody request); - partial void ProcessV1SummarizeBySegmentResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1SummarizeBySegmentResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Segmented Summarize - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1SummarizeBySegmentAsync( - global::AI21.SegmentedSummaryBody request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1SummarizeBySegmentArguments( - httpClient: HttpClient, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/summarize-by-segment", - 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); - PrepareV1SummarizeBySegmentRequest( - 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); - ProcessV1SummarizeBySegmentResponse( - 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); - ProcessV1SummarizeBySegmentResponseContent( - 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 - global::AI21.SummarizeBySegmentResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__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), - }; - } - - using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - return - await global::AI21.SummarizeBySegmentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - } - - /// - /// Segmented Summarize - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// An enumeration. - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1SummarizeBySegmentAsync( - string source, - global::AI21.DocumentType sourceType, - int? requestStartTime = default, - string? focus = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.SegmentedSummaryBody - { - Source = source, - SourceType = sourceType, - Focus = focus, - }; - - return await V1SummarizeBySegmentAsync( - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.SummarizeClient.g.cs b/src/libs/AI21/Generated/AI21.SummarizeClient.g.cs deleted file mode 100644 index d1c7081..0000000 --- a/src/libs/AI21/Generated/AI21.SummarizeClient.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 SummarizeClient : global::AI21.ISummarizeClient, 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 SummarizeClient. - /// 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 SummarizeClient( - 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/JsonConverters.DocumentType.g.cs b/src/libs/AI21/Generated/JsonConverters.ChatRequestMessageDiscriminatorRole.g.cs similarity index 66% rename from src/libs/AI21/Generated/JsonConverters.DocumentType.g.cs rename to src/libs/AI21/Generated/JsonConverters.ChatRequestMessageDiscriminatorRole.g.cs index 30fbc98..976f1c7 100644 --- a/src/libs/AI21/Generated/JsonConverters.DocumentType.g.cs +++ b/src/libs/AI21/Generated/JsonConverters.ChatRequestMessageDiscriminatorRole.g.cs @@ -3,10 +3,10 @@ namespace AI21.JsonConverters { /// - public sealed class DocumentTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ChatRequestMessageDiscriminatorRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::AI21.DocumentType Read( + public override global::AI21.ChatRequestMessageDiscriminatorRole Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class DocumentTypeJsonConverter : global::System.Text.Json.Seriali var stringValue = reader.GetString(); if (stringValue != null) { - return global::AI21.DocumentTypeExtensions.ToEnum(stringValue) ?? default; + return global::AI21.ChatRequestMessageDiscriminatorRoleExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,7 +26,7 @@ public sealed class DocumentTypeJsonConverter : global::System.Text.Json.Seriali case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::AI21.DocumentType)numValue; + return (global::AI21.ChatRequestMessageDiscriminatorRole)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,12 +38,12 @@ public sealed class DocumentTypeJsonConverter : global::System.Text.Json.Seriali /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.DocumentType value, + global::AI21.ChatRequestMessageDiscriminatorRole value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::AI21.DocumentTypeExtensions.ToValueString(value)); + writer.WriteStringValue(global::AI21.ChatRequestMessageDiscriminatorRoleExtensions.ToValueString(value)); } } } diff --git a/src/libs/AI21/Generated/JsonConverters.StyleTypeNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.ChatRequestMessageDiscriminatorRoleNullable.g.cs similarity index 68% rename from src/libs/AI21/Generated/JsonConverters.StyleTypeNullable.g.cs rename to src/libs/AI21/Generated/JsonConverters.ChatRequestMessageDiscriminatorRoleNullable.g.cs index e15b04d..387afcb 100644 --- a/src/libs/AI21/Generated/JsonConverters.StyleTypeNullable.g.cs +++ b/src/libs/AI21/Generated/JsonConverters.ChatRequestMessageDiscriminatorRoleNullable.g.cs @@ -3,10 +3,10 @@ namespace AI21.JsonConverters { /// - public sealed class StyleTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class ChatRequestMessageDiscriminatorRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::AI21.StyleType? Read( + public override global::AI21.ChatRequestMessageDiscriminatorRole? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class StyleTypeNullableJsonConverter : global::System.Text.Json.Se var stringValue = reader.GetString(); if (stringValue != null) { - return global::AI21.StyleTypeExtensions.ToEnum(stringValue); + return global::AI21.ChatRequestMessageDiscriminatorRoleExtensions.ToEnum(stringValue); } break; @@ -26,7 +26,7 @@ public sealed class StyleTypeNullableJsonConverter : global::System.Text.Json.Se case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::AI21.StyleType)numValue; + return (global::AI21.ChatRequestMessageDiscriminatorRole)numValue; } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -38,7 +38,7 @@ public sealed class StyleTypeNullableJsonConverter : global::System.Text.Json.Se /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.StyleType? value, + global::AI21.ChatRequestMessageDiscriminatorRole? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -49,7 +49,7 @@ public override void Write( } else { - writer.WriteStringValue(global::AI21.StyleTypeExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::AI21.ChatRequestMessageDiscriminatorRoleExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/AI21/Generated/JsonConverters.DocumentTypeNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.DocumentTypeNullable.g.cs deleted file mode 100644 index 948023a..0000000 --- a/src/libs/AI21/Generated/JsonConverters.DocumentTypeNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class DocumentTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.DocumentType? 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.DocumentTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.DocumentType)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.DocumentType? 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.DocumentTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.g.cs b/src/libs/AI21/Generated/JsonConverters.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.g.cs deleted file mode 100644 index 529e533..0000000 --- a/src/libs/AI21/Generated/JsonConverters.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole 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.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleNullable.g.cs deleted file mode 100644 index e8d226e..0000000 --- a/src/libs/AI21/Generated/JsonConverters.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? 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.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? 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.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.MessagesItem.g.cs b/src/libs/AI21/Generated/JsonConverters.MessagesItem.g.cs index ee58a56..dc0fa58 100644 --- a/src/libs/AI21/Generated/JsonConverters.MessagesItem.g.cs +++ b/src/libs/AI21/Generated/JsonConverters.MessagesItem.g.cs @@ -17,33 +17,33 @@ public class MessagesItemJsonConverter : global::System.Text.Json.Serialization. var readerCopy = reader; - var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator)}"); + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.ChatRequestMessageDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.ChatRequestMessageDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::AI21.UserMessage? user = default; - if (discriminator?.Role == global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.User) + if (discriminator?.Role == global::AI21.ChatRequestMessageDiscriminatorRole.User) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.UserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.UserMessage)}"); user = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::AI21.AssistantMessage? assistant = default; - if (discriminator?.Role == global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.Assistant) + if (discriminator?.Role == global::AI21.ChatRequestMessageDiscriminatorRole.Assistant) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.AssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.AssistantMessage)}"); assistant = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::AI21.ToolMessage? tool = default; - if (discriminator?.Role == global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.Tool) + if (discriminator?.Role == global::AI21.ChatRequestMessageDiscriminatorRole.Tool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.ToolMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.ToolMessage)}"); tool = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::AI21.SystemMessage? system = default; - if (discriminator?.Role == global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.System) + if (discriminator?.Role == global::AI21.ChatRequestMessageDiscriminatorRole.System) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.SystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.SystemMessage)}"); diff --git a/src/libs/AI21/Generated/JsonConverters.RoleType.g.cs b/src/libs/AI21/Generated/JsonConverters.RoleType.g.cs deleted file mode 100644 index 54de092..0000000 --- a/src/libs/AI21/Generated/JsonConverters.RoleType.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class RoleTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.RoleType 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.RoleTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.RoleType)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.RoleType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::AI21.RoleTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.RoleTypeNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.RoleTypeNullable.g.cs deleted file mode 100644 index c7d480f..0000000 --- a/src/libs/AI21/Generated/JsonConverters.RoleTypeNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class RoleTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.RoleType? 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.RoleTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.RoleType)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.RoleType? 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.RoleTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.StyleType.g.cs b/src/libs/AI21/Generated/JsonConverters.StyleType.g.cs deleted file mode 100644 index eb098eb..0000000 --- a/src/libs/AI21/Generated/JsonConverters.StyleType.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class StyleTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.StyleType 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.StyleTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.StyleType)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.StyleType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::AI21.StyleTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.SummaryMethod.g.cs b/src/libs/AI21/Generated/JsonConverters.SummaryMethod.g.cs deleted file mode 100644 index eb2502f..0000000 --- a/src/libs/AI21/Generated/JsonConverters.SummaryMethod.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class SummaryMethodJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.SummaryMethod 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.SummaryMethodExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.SummaryMethod)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.SummaryMethod value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::AI21.SummaryMethodExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.SummaryMethodNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.SummaryMethodNullable.g.cs deleted file mode 100644 index 74deed4..0000000 --- a/src/libs/AI21/Generated/JsonConverters.SummaryMethodNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class SummaryMethodNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.SummaryMethod? 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.SummaryMethodExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.SummaryMethod)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.SummaryMethod? 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.SummaryMethodExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/AI21/Generated/JsonSerializerContext.g.cs b/src/libs/AI21/Generated/JsonSerializerContext.g.cs index 04d8718..28567fa 100644 --- a/src/libs/AI21/Generated/JsonSerializerContext.g.cs +++ b/src/libs/AI21/Generated/JsonSerializerContext.g.cs @@ -19,8 +19,22 @@ namespace AI21 typeof(global::AI21.JsonConverters.ToolCallTypeNullableJsonConverter), typeof(global::AI21.JsonConverters.ChatStreamingFirstDeltaRoleJsonConverter), typeof(global::AI21.JsonConverters.ChatStreamingFirstDeltaRoleNullableJsonConverter), - typeof(global::AI21.JsonConverters.RoleTypeJsonConverter), - typeof(global::AI21.JsonConverters.RoleTypeNullableJsonConverter), + typeof(global::AI21.JsonConverters.ModelNameJsonConverter), + typeof(global::AI21.JsonConverters.ModelNameNullableJsonConverter), + typeof(global::AI21.JsonConverters.UserMessageRoleJsonConverter), + typeof(global::AI21.JsonConverters.UserMessageRoleNullableJsonConverter), + typeof(global::AI21.JsonConverters.ToolMessageRoleJsonConverter), + typeof(global::AI21.JsonConverters.ToolMessageRoleNullableJsonConverter), + typeof(global::AI21.JsonConverters.SystemMessageRoleJsonConverter), + typeof(global::AI21.JsonConverters.SystemMessageRoleNullableJsonConverter), + typeof(global::AI21.JsonConverters.ChatRequestMessageDiscriminatorRoleJsonConverter), + typeof(global::AI21.JsonConverters.ChatRequestMessageDiscriminatorRoleNullableJsonConverter), + typeof(global::AI21.JsonConverters.ToolDefinitionTypeJsonConverter), + typeof(global::AI21.JsonConverters.ToolDefinitionTypeNullableJsonConverter), + typeof(global::AI21.JsonConverters.ToolParametersTypeJsonConverter), + typeof(global::AI21.JsonConverters.ToolParametersTypeNullableJsonConverter), + typeof(global::AI21.JsonConverters.ResponseFormatTypeJsonConverter), + typeof(global::AI21.JsonConverters.ResponseFormatTypeNullableJsonConverter), typeof(global::AI21.JsonConverters.ConnectorsWorkflowStatusJsonConverter), typeof(global::AI21.JsonConverters.ConnectorsWorkflowStatusNullableJsonConverter), typeof(global::AI21.JsonConverters.MessageRoleJsonConverter), @@ -29,39 +43,17 @@ namespace AI21 typeof(global::AI21.JsonConverters.ConversationalRagConfigRetrievalStrategyNullableJsonConverter), typeof(global::AI21.JsonConverters.CustomModelTypeJsonConverter), typeof(global::AI21.JsonConverters.CustomModelTypeNullableJsonConverter), - typeof(global::AI21.JsonConverters.DocumentTypeJsonConverter), - typeof(global::AI21.JsonConverters.DocumentTypeNullableJsonConverter), typeof(global::AI21.JsonConverters.FileStatusJsonConverter), typeof(global::AI21.JsonConverters.FileStatusNullableJsonConverter), - typeof(global::AI21.JsonConverters.ToolParametersTypeJsonConverter), - typeof(global::AI21.JsonConverters.ToolParametersTypeNullableJsonConverter), typeof(global::AI21.JsonConverters.LibrarySearchRequestLabelsFilterModeJsonConverter), typeof(global::AI21.JsonConverters.LibrarySearchRequestLabelsFilterModeNullableJsonConverter), typeof(global::AI21.JsonConverters.RetrievalStrategyJsonConverter), typeof(global::AI21.JsonConverters.RetrievalStrategyNullableJsonConverter), - typeof(global::AI21.JsonConverters.ModelNameJsonConverter), - typeof(global::AI21.JsonConverters.ModelNameNullableJsonConverter), - typeof(global::AI21.JsonConverters.StyleTypeJsonConverter), - typeof(global::AI21.JsonConverters.StyleTypeNullableJsonConverter), - typeof(global::AI21.JsonConverters.ResponseFormatTypeJsonConverter), - typeof(global::AI21.JsonConverters.ResponseFormatTypeNullableJsonConverter), - typeof(global::AI21.JsonConverters.SummaryMethodJsonConverter), - typeof(global::AI21.JsonConverters.SummaryMethodNullableJsonConverter), - typeof(global::AI21.JsonConverters.SystemMessageRoleJsonConverter), - typeof(global::AI21.JsonConverters.SystemMessageRoleNullableJsonConverter), - typeof(global::AI21.JsonConverters.ToolDefinitionTypeJsonConverter), - typeof(global::AI21.JsonConverters.ToolDefinitionTypeNullableJsonConverter), - typeof(global::AI21.JsonConverters.ToolMessageRoleJsonConverter), - typeof(global::AI21.JsonConverters.ToolMessageRoleNullableJsonConverter), - typeof(global::AI21.JsonConverters.UserMessageRoleJsonConverter), - typeof(global::AI21.JsonConverters.UserMessageRoleNullableJsonConverter), - typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleJsonConverter), - typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRoleNullableJsonConverter), - typeof(global::AI21.JsonConverters.QueryFilterJsonConverter), typeof(global::AI21.JsonConverters.MessagesItemJsonConverter), + typeof(global::AI21.JsonConverters.QueryFilterJsonConverter), typeof(global::AI21.JsonConverters.AnyOfJsonConverter), - typeof(global::AI21.JsonConverters.AnyOfJsonConverter), typeof(global::AI21.JsonConverters.AnyOfJsonConverter>), + typeof(global::AI21.JsonConverters.AnyOfJsonConverter), typeof(global::AI21.JsonConverters.AnyOfJsonConverter>), })] diff --git a/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs b/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs index 3c06235..df3fdbf 100644 --- a/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs @@ -142,362 +142,266 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::AI21.ChatMessage? Type31 { get; set; } + public global::AI21.ChatRequest? Type31 { get; set; } /// /// /// - public global::AI21.RoleType? Type32 { get; set; } + public global::AI21.ModelName? Type32 { get; set; } /// /// /// - public global::AI21.ChatOutput? Type33 { get; set; } + public global::System.Collections.Generic.IList? Type33 { get; set; } /// /// /// - public global::AI21.FinishReason? Type34 { get; set; } + public global::AI21.MessagesItem? Type34 { get; set; } /// /// /// - public global::AI21.ChatResponse? Type35 { get; set; } + public global::AI21.UserMessage? Type35 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type36 { get; set; } + public global::AI21.UserMessageRole? Type36 { get; set; } /// /// /// - public global::AI21.CompletionBody? Type37 { get; set; } + public global::AI21.ToolMessage? Type37 { get; set; } /// /// /// - public global::AI21.Penalty? Type38 { get; set; } + public global::AI21.ToolMessageRole? Type38 { get; set; } /// /// /// - public bool? Type39 { get; set; } + public global::AI21.SystemMessage? Type39 { get; set; } /// /// /// - public global::AI21.ConnectorsDataSources? Type40 { get; set; } + public global::AI21.SystemMessageRole? Type40 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type41 { get; set; } + public global::AI21.ChatRequestMessageDiscriminator? Type41 { get; set; } /// /// /// - public global::AI21.DataSourceMetadata? Type42 { get; set; } + public global::AI21.ChatRequestMessageDiscriminatorRole? Type42 { get; set; } /// /// /// - public global::AI21.ConnectorsStatus? Type43 { get; set; } + public global::System.Collections.Generic.IList? Type43 { get; set; } /// /// /// - public global::AI21.ConnectorsWorkflowStatus? Type44 { get; set; } + public global::AI21.ToolDefinition? Type44 { get; set; } /// /// /// - public global::AI21.ConnectorsToken? Type45 { get; set; } + public global::AI21.ToolDefinitionType? Type45 { get; set; } /// /// /// - public global::AI21.ConversationalRagConfig? Type46 { get; set; } + public global::AI21.FunctionToolDefinition? Type46 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type47 { get; set; } + public global::AI21.ToolParameters? Type47 { get; set; } /// /// /// - public global::AI21.Message? Type48 { get; set; } + public global::AI21.ToolParametersType? Type48 { get; set; } /// /// /// - public global::AI21.MessageRole? Type49 { get; set; } + public global::AI21.AnyOf>? Type49 { get; set; } /// /// /// - public global::AI21.ConversationalRagConfigRetrievalStrategy? Type50 { get; set; } + public bool? Type50 { get; set; } /// /// /// - public global::AI21.ConversationalRagResult? Type51 { get; set; } + public global::AI21.MockResponseConfig? Type51 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type52 { get; set; } + public global::System.Collections.Generic.IList? Type52 { get; set; } /// /// /// - public global::AI21.ConversationalRagSource? Type53 { get; set; } + public global::AI21.DocumentSchema? Type53 { get; set; } /// /// /// - public global::AI21.CustomModelInput? Type54 { get; set; } + public global::System.Collections.Generic.Dictionary? Type54 { get; set; } /// /// /// - public global::AI21.CustomModelType? Type55 { get; set; } + public global::AI21.ResponseFormat? Type55 { get; set; } /// /// /// - public global::AI21.CustomModelUpdateBody? Type56 { get; set; } + public global::AI21.ResponseFormatType? Type56 { get; set; } /// /// /// - public global::AI21.DocumentSchema? Type57 { get; set; } + public global::AI21.CompletionBody? Type57 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type58 { get; set; } + public global::AI21.Penalty? Type58 { get; set; } /// /// /// - public global::AI21.DocumentType? Type59 { get; set; } + public global::AI21.ConnectorsDataSources? Type59 { get; set; } /// /// /// - public global::AI21.FileResponse? Type60 { get; set; } + public global::System.Collections.Generic.IList? Type60 { get; set; } /// /// /// - public global::System.Guid? Type61 { get; set; } + public global::AI21.DataSourceMetadata? Type61 { get; set; } /// /// /// - public global::System.DateTime? Type62 { get; set; } + public global::AI21.ConnectorsStatus? Type62 { get; set; } /// /// /// - public global::AI21.FileStatus? Type63 { get; set; } + public global::AI21.ConnectorsWorkflowStatus? Type63 { get; set; } /// /// /// - public global::AI21.FilesUpdateRequest? Type64 { get; set; } + public global::AI21.ConnectorsToken? Type64 { get; set; } /// /// /// - public global::AI21.FunctionToolDefinition? Type65 { get; set; } + public global::AI21.ConversationalRagConfig? Type65 { get; set; } /// /// /// - public global::AI21.ToolParameters? Type66 { get; set; } + public global::System.Collections.Generic.IList? Type66 { get; set; } /// /// /// - public global::AI21.ToolParametersType? Type67 { get; set; } + public global::AI21.Message? Type67 { get; set; } /// /// /// - public global::AI21.HTTPValidationError? Type68 { get; set; } + public global::AI21.MessageRole? Type68 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type69 { get; set; } + public global::AI21.ConversationalRagConfigRetrievalStrategy? Type69 { get; set; } /// /// /// - public global::AI21.ValidationError? Type70 { get; set; } + public global::AI21.ConversationalRagResult? Type70 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type71 { get; set; } + public global::System.Collections.Generic.IList? Type71 { get; set; } /// /// /// - public global::AI21.AnyOf? Type72 { get; set; } + public global::AI21.ConversationalRagSource? Type72 { get; set; } /// /// /// - public global::AI21.Highlight? Type73 { get; set; } + public global::AI21.CustomModelInput? Type73 { get; set; } /// /// /// - public global::AI21.LibrarySearchRequest? Type74 { get; set; } + public global::AI21.CustomModelType? Type74 { get; set; } /// /// /// - public global::AI21.QueryFilter? Type75 { get; set; } + public global::AI21.CustomModelUpdateBody? Type75 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary>? Type76 { get; set; } + public global::AI21.FileResponse? Type76 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type77 { get; set; } + public global::System.Guid? Type77 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type78 { get; set; } + public global::System.DateTime? Type78 { get; set; } /// /// /// - public global::AI21.LibrarySearchRequestLabelsFilterMode? Type79 { get; set; } + public global::AI21.FileStatus? Type79 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type80 { get; set; } + public global::AI21.FilesUpdateRequest? Type80 { get; set; } /// /// /// - public global::AI21.RetrievalStrategy? Type81 { get; set; } + public global::AI21.HTTPValidationError? Type81 { get; set; } /// /// /// - public global::AI21.MockResponseConfig? Type82 { get; set; } + public global::System.Collections.Generic.IList? Type82 { get; set; } /// /// /// - public global::AI21.ModelName? Type83 { get; set; } + public global::AI21.ValidationError? Type83 { get; set; } /// /// /// - public global::AI21.ParaphraseBody? Type84 { get; set; } + public global::System.Collections.Generic.IList>? Type84 { get; set; } /// /// /// - public global::AI21.StyleType? Type85 { get; set; } + public global::AI21.AnyOf? Type85 { get; set; } /// /// /// - public global::AI21.ResponseFormat? Type86 { get; set; } + public global::AI21.LibrarySearchRequest? Type86 { get; set; } /// /// /// - public global::AI21.ResponseFormatType? Type87 { get; set; } + public global::AI21.QueryFilter? Type87 { get; set; } /// /// /// - public global::AI21.Segment? Type88 { get; set; } + public global::System.Collections.Generic.Dictionary>? Type88 { get; set; } /// /// /// - public global::AI21.SegmentSummary? Type89 { get; set; } + public global::System.Collections.Generic.IList? Type89 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type90 { get; set; } + public global::System.Collections.Generic.Dictionary? Type90 { get; set; } /// /// /// - public global::AI21.SegmentationBody? Type91 { get; set; } + public global::AI21.LibrarySearchRequestLabelsFilterMode? Type91 { get; set; } /// /// /// - public global::AI21.SegmentationResponse? Type92 { get; set; } + public global::System.Collections.Generic.IList? Type92 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type93 { get; set; } + public global::AI21.RetrievalStrategy? Type93 { get; set; } /// /// /// - public global::AI21.SegmentedSummaryBody? Type94 { get; set; } + public global::AI21.AnyOf>? Type94 { get; set; } /// /// /// - public global::AI21.SummarizationResponse? Type95 { get; set; } + public global::System.Collections.Generic.IList? Type95 { get; set; } /// /// /// - public global::AI21.SummarizeBody? Type96 { get; set; } - /// - /// - /// - public global::AI21.SummaryMethod? Type97 { get; set; } - /// - /// - /// - public global::AI21.SummarizeBySegmentResponse? Type98 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type99 { get; set; } - /// - /// - /// - public global::AI21.SystemMessage? Type100 { get; set; } - /// - /// - /// - public global::AI21.SystemMessageRole? Type101 { get; set; } - /// - /// - /// - public global::AI21.ToolDefinition? Type102 { get; set; } - /// - /// - /// - public global::AI21.ToolDefinitionType? Type103 { get; set; } - /// - /// - /// - public global::AI21.ToolMessage? Type104 { get; set; } - /// - /// - /// - public global::AI21.ToolMessageRole? Type105 { get; set; } - /// - /// - /// - public global::AI21.UserMessage? Type106 { get; set; } - /// - /// - /// - public global::AI21.UserMessageRole? Type107 { get; set; } - /// - /// - /// - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequest? Type108 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type109 { get; set; } - /// - /// - /// - public global::AI21.MessagesItem? Type110 { get; set; } - /// - /// - /// - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator? Type111 { get; set; } - /// - /// - /// - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? Type112 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type113 { get; set; } - /// - /// - /// - public global::AI21.AnyOf>? Type114 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type115 { get; set; } - /// - /// - /// - public global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest? Type116 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type117 { get; set; } - /// - /// - /// - public global::AI21.AnyOf>? Type118 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type119 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type120 { get; set; } + public global::System.Collections.Generic.IList? Type96 { get; set; } } } \ No newline at end of file diff --git a/src/libs/AI21/openapi.yaml b/src/libs/AI21/openapi.yaml index 17868dd..548e27e 100644 --- a/src/libs/AI21/openapi.yaml +++ b/src/libs/AI21/openapi.yaml @@ -59,7 +59,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/language_studio_api_server__data_types__chat__ChatRequest' + $ref: '#/components/schemas/ChatRequest' required: true responses: '200': @@ -79,43 +79,6 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /studio/v1/j2-light/complete: - post: - tags: - - completion - summary: j2-light complete - operationId: v1_j2_light_complete - parameters: - - name: model - in: query - schema: - title: Model - 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-light/{custom_model_name}/complete': post: tags: @@ -159,43 +122,6 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /studio/v1/j2-mid/complete: - post: - tags: - - completion - summary: j2-mid complete - operationId: v1_j2_mid_complete - parameters: - - name: model - in: query - schema: - title: Model - 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-mid/{custom_model_name}/complete': post: tags: @@ -239,43 +165,6 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /studio/v1/j2-ultra/complete: - post: - tags: - - completion - summary: j2-ultra complete - operationId: v1_j2_ultra_complete - parameters: - - name: model - in: query - schema: - title: Model - 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-ultra/{custom_model_name}/complete': post: tags: @@ -319,228 +208,6 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /studio/v1/j2-large/complete: - post: - tags: - - completion - summary: j2-large complete - operationId: v1_j2_large_complete - parameters: - - name: model - in: query - schema: - title: Model - 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-large-instruct/complete: - post: - tags: - - completion - summary: j2-large-instruct complete - operationId: v1_j2_large_instruct_complete - parameters: - - name: model - in: query - schema: - title: Model - type: string - default: j2-large-instruct - - 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/complete: - post: - tags: - - completion - summary: j2-grande complete - operationId: v1_j2_grande_complete - parameters: - - name: model - in: query - schema: - title: Model - 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-grande-instruct/complete: - post: - tags: - - completion - summary: j2-grande-instruct complete - operationId: v1_j2_grande_instruct_complete - parameters: - - name: model - in: query - schema: - title: Model - type: string - default: j2-grande-instruct - - 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/complete: - post: - tags: - - completion - summary: j2-jumbo complete - operationId: v1_j2_jumbo_complete - parameters: - - name: model - in: query - schema: - title: Model - 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/j2-jumbo-instruct/complete: - post: - tags: - - completion - summary: j2-jumbo-instruct complete - operationId: v1_j2_jumbo_instruct_complete - parameters: - - name: model - in: query - schema: - title: Model - type: string - default: j2-jumbo-instruct - - 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: @@ -829,133 +496,6 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /studio/v1/paraphrase: - post: - tags: - - paraphrase - summary: Paraphrase - operationId: v1_paraphraze - parameters: - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ParaphraseBody' - 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/summarize: - post: - tags: - - summarize - summary: Summarize - operationId: v1_summarize - parameters: - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SummarizeBody' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/SummarizationResponse' - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - /studio/v1/summarize-by-segment: - post: - tags: - - summarize - summary: Segmented Summarize - operationId: v1_summarize_by_segment - parameters: - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentedSummaryBody' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/SummarizeBySegmentResponse' - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - /studio/v1/segmentation: - post: - tags: - - segmentation - summary: Segmentation - operationId: v1_segmentation - parameters: - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentationBody' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentationResponse' - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' /studio/v1/conversational-rag: post: summary: Conversational Rag @@ -1248,44 +788,6 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /studio/v1/j2-ultra/chat: - post: - tags: - - chat - summary: j2-ultra chat - operationId: v1_j2_ultra_chat - parameters: - - name: model - in: query - schema: - title: Model - 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/language_studio_api_server__data_types__j2_chat__ChatRequest' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/ChatResponse' - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' '/studio/v1/connectors/connected-users/{organization_id}/tokens': post: summary: Generate Org Token @@ -1529,49 +1031,85 @@ components: title: Meta type: object description: Returned for streaming messages. Non-streaming responses return `ChatCompletion`. - ChatMessage: - title: ChatMessage - required: - - role - - text - type: object - properties: - role: - $ref: '#/components/schemas/RoleType' - text: - title: Text - type: string - ChatOutput: - title: ChatOutput - required: - - text - - role - - finishReason - type: object - properties: - text: - title: Text - type: string - role: - $ref: '#/components/schemas/RoleType' - finishReason: - $ref: '#/components/schemas/FinishReason' - ChatResponse: - title: ChatResponse + ChatRequest: + title: ChatRequest required: - - id - - outputs + - model + - messages type: object properties: - id: - title: Id - type: string - description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" - outputs: - title: Outputs + model: + $ref: '#/components/schemas/ModelName' + messages: + title: Messages + type: array + items: + oneOf: + - $ref: '#/components/schemas/UserMessage' + - $ref: '#/components/schemas/AssistantMessage' + - $ref: '#/components/schemas/ToolMessage' + - $ref: '#/components/schemas/SystemMessage' + discriminator: + propertyName: role + mapping: + user: '#/components/schemas/UserMessage' + assistant: '#/components/schemas/AssistantMessage' + tool: '#/components/schemas/ToolMessage' + system: '#/components/schemas/SystemMessage' + description: "The previous messages in this chat, from oldest (index 0) to newest. Messages\nmust be alternating `user`/`assistant` messages, optionally starting with a `system`\nmessage. For single turn interactions, this should be an optional `system` message,\nand a single `user` message. Maximum total size for the list is about 256K tokens.\n" + tools: + title: Tools + type: array + items: + $ref: '#/components/schemas/ToolDefinition' + n: + title: N + type: integer + description: "How many chat responses to generate. _Range: 1 – 16_ **Notes:**\n- If `n > 1`, setting `temperature=0` will fail because all answers are guaranteed to be duplicates.\n- `n` must be 1 when `stream = True`\n" + default: 1 + max_tokens: + title: Max Tokens + type: integer + description: "The maximum number of tokens to allow for each generated response message. Typically\nthe best way to limit output length is by providing a length limit in the system\nprompt (for example, \"limit your answers to three sentences\"). _Range: 0 – 4096_\n" + default: 4096 + temperature: + title: Temperature + type: number + description: "How much variation to provide in each answer. Setting this value to 0 guarantees the\nsame response to the same question every time. Setting a higher value encourages more\nvariation. Modifies the distribution from which tokens are sampled.\n[More information](https://docs.ai21.com/docs/sampling-from-language-models#temperature)\n_Range: 0.0 – 2.0_\n" + top_p: + title: Top P + maximum: 1.0 + minimum: 0.0 + exclusiveMinimum: true + type: number + description: "Limit the pool of next tokens in each step to the top N percentile of possible\ntokens, where 1.0 means the pool of all possible tokens, and 0.01 means the\npool of only the most likely next tokens. [More information]\n(https://docs.ai21.com/docs/sampling-from-language-models#topp) _Range: 0 \\<= value \\<=1.0_\n" + default: 1 + stop: + title: Stop + anyOf: + - type: string + - type: array + items: + type: string + description: "End the message when the model generates one of these strings. The stop sequence\nis not included in the generated message. Each sequence can be up to 64K long, and\ncan contain newlines as `\\n` characters. Examples:\n- Single stop string with a word and a period: \"monkeys.\"\n- Multiple stop strings and a newline: [\"cat\", \"dog\", \" .\", \"####\", \"\\n\"]\n" + stream: + title: Stream + type: boolean + description: "Whether or not to stream the result one token at a time using\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).\nThis can be useful when waiting for long results where a long wait time for an\nanswer can be problematic, such as a chatbot. If set to `True`, then `n` must\nbe 1. A streaming response is different than the non-streaming response.\n" + default: false + mock_response: + $ref: '#/components/schemas/MockResponseConfig' + documents: + title: Documents type: array items: - $ref: '#/components/schemas/ChatOutput' + $ref: '#/components/schemas/DocumentSchema' + response_format: + title: Response Format + allOf: + - $ref: '#/components/schemas/ResponseFormat' + default: + type: text ChatStreamingContentDelta: title: ChatStreamingContentDelta required: @@ -1927,13 +1465,6 @@ components: type: object additionalProperties: type: string - DocumentType: - title: DocumentType - enum: - - URL - - TEXT - type: string - description: An enumeration. FileResponse: title: FileResponse required: @@ -2021,21 +1552,6 @@ components: items: type: string description: "Any labels to associate with this file. Separate multiple labels with commas. If\nprovided, will overwrite all existing labels.\n" - FinishReason: - title: FinishReason - required: - - reason - type: object - properties: - reason: - title: Reason - type: string - length: - title: Length - type: integer - sequence: - title: Sequence - type: string FunctionToolDefinition: title: FunctionToolDefinition required: @@ -2059,23 +1575,6 @@ components: type: array items: $ref: '#/components/schemas/ValidationError' - Highlight: - title: Highlight - required: - - text - - startIndex - - endIndex - type: object - properties: - text: - title: Text - type: string - startIndex: - title: Startindex - type: integer - endIndex: - title: Endindex - type: integer LibrarySearchRequest: title: LibrarySearchRequest required: @@ -2206,27 +1705,6 @@ components: - jamba-1.5-large type: string description: An enumeration. - ParaphraseBody: - title: ParaphraseBody - required: - - text - type: object - properties: - text: - title: Text - type: string - style: - allOf: - - $ref: '#/components/schemas/StyleType' - default: general - startIndex: - title: Startindex - type: integer - default: 0 - endIndex: - title: Endindex - type: integer - description: This class is to be used as a common class to all Studio API requests payloads Penalty: title: Penalty required: @@ -2284,164 +1762,6 @@ components: - full_doc type: string description: An enumeration. - RoleType: - title: RoleType - enum: - - user - - assistant - type: string - description: An enumeration. - Segment: - title: Segment - required: - - segmentText - - segmentType - type: object - properties: - segmentText: - title: Segmenttext - type: string - segmentType: - title: Segmenttype - type: string - SegmentSummary: - title: SegmentSummary - required: - - segmentText - - segmentType - - hasSummary - - highlights - type: object - properties: - summary: - title: Summary - type: string - segmentText: - title: Segmenttext - type: string - segmentHtml: - title: Segmenthtml - type: string - segmentType: - title: Segmenttype - type: string - hasSummary: - title: Hassummary - type: boolean - highlights: - title: Highlights - type: array - items: - $ref: '#/components/schemas/Highlight' - SegmentationBody: - title: SegmentationBody - required: - - sourceType - - source - type: object - properties: - sourceType: - $ref: '#/components/schemas/DocumentType' - source: - title: Source - type: string - description: This class is to be used as a common class to all Studio API requests payloads - SegmentationResponse: - title: SegmentationResponse - required: - - id - - segments - type: object - properties: - id: - title: Id - type: string - description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" - segments: - title: Segments - type: array - items: - $ref: '#/components/schemas/Segment' - SegmentedSummaryBody: - title: SegmentedSummaryBody - required: - - source - - sourceType - type: object - properties: - source: - title: Source - type: string - sourceType: - $ref: '#/components/schemas/DocumentType' - focus: - title: Focus - type: string - description: This class is to be used as a common class to all Studio API requests payloads - StyleType: - title: StyleType - enum: - - long - - short - - formal - - casual - - general - description: An enumeration. - SummarizationResponse: - title: SummarizationResponse - required: - - id - - summary - type: object - properties: - id: - title: Id - type: string - description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" - summary: - title: Summary - type: string - SummarizeBody: - title: SummarizeBody - required: - - source - - sourceType - type: object - properties: - source: - title: Source - type: string - sourceType: - $ref: '#/components/schemas/DocumentType' - focus: - title: Focus - type: string - summaryMethod: - $ref: '#/components/schemas/SummaryMethod' - description: This class is to be used as a common class to all Studio API requests payloads - SummarizeBySegmentResponse: - title: SummarizeBySegmentResponse - required: - - id - - segments - type: object - properties: - id: - title: Id - type: string - description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" - segments: - title: Segments - type: array - items: - $ref: '#/components/schemas/SegmentSummary' - SummaryMethod: - title: SummaryMethod - enum: - - segments - - guided - - fullDocument - description: An enumeration. SystemMessage: title: SystemMessage required: @@ -2616,159 +1936,6 @@ components: type: title: Error Type type: string - language_studio_api_server__data_types__chat__ChatRequest: - title: ChatRequest - required: - - model - - messages - type: object - properties: - model: - $ref: '#/components/schemas/ModelName' - messages: - title: Messages - type: array - items: - oneOf: - - $ref: '#/components/schemas/UserMessage' - - $ref: '#/components/schemas/AssistantMessage' - - $ref: '#/components/schemas/ToolMessage' - - $ref: '#/components/schemas/SystemMessage' - discriminator: - propertyName: role - mapping: - user: '#/components/schemas/UserMessage' - assistant: '#/components/schemas/AssistantMessage' - tool: '#/components/schemas/ToolMessage' - system: '#/components/schemas/SystemMessage' - description: messages - tools: - title: Tools - type: array - items: - $ref: '#/components/schemas/ToolDefinition' - n: - title: N - type: integer - default: 1 - max_tokens: - title: Max Tokens - type: integer - default: 4096 - temperature: - title: Temperature - type: number - top_p: - title: Top P - maximum: 1.0 - minimum: 0.0 - exclusiveMinimum: true - type: number - default: 1 - stop: - title: Stop - anyOf: - - type: string - - type: array - items: - type: string - stream: - title: Stream - type: boolean - description: "Whether or not to stream the result one token at a time using\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events).\nThis can be useful when waiting for long results where a long wait time for an\nanswer can be problematic, such as a chatbot. If set to `True`, then `n` must\nbe 1. A streaming response is different than the non-streaming response.\n" - default: false - mock_response: - $ref: '#/components/schemas/MockResponseConfig' - documents: - title: Documents - type: array - items: - $ref: '#/components/schemas/DocumentSchema' - response_format: - title: Response Format - allOf: - - $ref: '#/components/schemas/ResponseFormat' - default: - type: text - language_studio_api_server__data_types__j2_chat__ChatRequest: - title: ChatRequest - required: - - messages - - system - type: object - properties: - messages: - title: Messages - type: array - items: - $ref: '#/components/schemas/ChatMessage' - description: messages - system: - title: System - type: string - 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 - numResults: - title: Numresults - type: integer - default: 1 - temperature: - title: Temperature - type: number - default: 0.7 - maxTokens: - title: Maxtokens - type: integer - default: 300 - minTokens: - title: Mintokens - type: integer - default: 0 - topP: - title: Topp - type: number - default: 1 - topKReturn: - title: Topkreturn - type: integer - default: 0 - stopSequences: - title: Stopsequences - type: array - items: - type: string - description: This class is to be used as a common class to all Studio API requests payloads securitySchemes: Bearer: type: http