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