From 69e7165cb3b4df7b563e33bf12b9c9d7f1f2de80 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 13 Nov 2024 15:22:21 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...braryManagementClient.V1LibraryDelete.g.cs | 2 +- ...braryManagementClient.V1LibraryUpload.g.cs | 4 +- ...AI21.IRAGEngineClient.V1LibraryAnswer.g.cs | 65 ---- ...AI21.IRAGEngineClient.V1LibrarySearch.g.cs | 4 +- ...braryManagementClient.V1LibraryDelete.g.cs | 8 +- ...braryManagementClient.V1LibraryUpload.g.cs | 10 +- .../Generated/AI21.Models.AnswerLength.g.cs | 57 ---- .../AI21.Models.FileDeleteResponse.g.cs | 60 ---- .../AI21.Models.FileUploadResponse.g.cs | 64 ---- .../AI21.Models.LibraryAnswerRequest.g.cs | 154 ---------- ....LibraryAnswerRequestLabelsFilterMode.g.cs | 51 --- ...I21.Models.LibraryAnswerResponse.Json.g.cs | 92 ------ .../AI21.Models.LibraryAnswerResponse.g.cs | 76 ----- ...I21.Models.LibrarySearchResponse.Json.g.cs | 92 ------ .../AI21.Models.LibrarySearchResponse.g.cs | 58 ---- .../AI21.Models.LibrarySearchResult.Json.g.cs | 92 ------ .../AI21.Models.LibrarySearchResult.g.cs | 99 ------ src/libs/AI21/Generated/AI21.Models.Mode.g.cs | 51 --- .../AI21.Models.SourceDocument.Json.g.cs | 92 ------ .../Generated/AI21.Models.SourceDocument.g.cs | 80 ----- ....Models.V1LibraryDeleteResponse.Json.g.cs} | 22 +- .../AI21.Models.V1LibraryDeleteResponse.g.cs | 27 ++ ....Models.V1LibrarySearchResponse.Json.g.cs} | 22 +- .../AI21.Models.V1LibrarySearchResponse.g.cs | 27 ++ ....Models.V1LibraryUploadResponse.Json.g.cs} | 22 +- .../AI21.Models.V1LibraryUploadResponse.g.cs | 27 ++ .../AI21.RAGEngineClient.V1LibraryAnswer.g.cs | 263 ---------------- .../AI21.RAGEngineClient.V1LibrarySearch.g.cs | 10 +- .../JsonConverters.AnswerLength.g.cs | 49 --- .../JsonConverters.AnswerLengthNullable.g.cs | 56 ---- ....LibraryAnswerRequestLabelsFilterMode.g.cs | 49 --- ...AnswerRequestLabelsFilterModeNullable.g.cs | 56 ---- .../AI21/Generated/JsonConverters.Mode.g.cs | 49 --- .../JsonConverters.ModeNullable.g.cs | 56 ---- .../AI21/Generated/JsonSerializerContext.g.cs | 10 +- .../Generated/JsonSerializerContextTypes.g.cs | 290 ++++++++---------- src/libs/AI21/openapi.yaml | 235 +------------- 37 files changed, 256 insertions(+), 2225 deletions(-) delete mode 100644 src/libs/AI21/Generated/AI21.IRAGEngineClient.V1LibraryAnswer.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.AnswerLength.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.FileDeleteResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.FileUploadResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequestLabelsFilterMode.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.LibraryAnswerResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.LibraryAnswerResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.LibrarySearchResponse.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.LibrarySearchResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.LibrarySearchResult.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.LibrarySearchResult.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.Mode.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.SourceDocument.Json.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.SourceDocument.g.cs rename src/libs/AI21/Generated/{AI21.Models.FileUploadResponse.Json.g.cs => AI21.Models.V1LibraryDeleteResponse.Json.g.cs} (87%) create mode 100644 src/libs/AI21/Generated/AI21.Models.V1LibraryDeleteResponse.g.cs rename src/libs/AI21/Generated/{AI21.Models.FileDeleteResponse.Json.g.cs => AI21.Models.V1LibrarySearchResponse.Json.g.cs} (87%) create mode 100644 src/libs/AI21/Generated/AI21.Models.V1LibrarySearchResponse.g.cs rename src/libs/AI21/Generated/{AI21.Models.LibraryAnswerRequest.Json.g.cs => AI21.Models.V1LibraryUploadResponse.Json.g.cs} (87%) create mode 100644 src/libs/AI21/Generated/AI21.Models.V1LibraryUploadResponse.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryAnswer.g.cs delete mode 100644 src/libs/AI21/Generated/JsonConverters.AnswerLength.g.cs delete mode 100644 src/libs/AI21/Generated/JsonConverters.AnswerLengthNullable.g.cs delete mode 100644 src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterMode.g.cs delete mode 100644 src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterModeNullable.g.cs delete mode 100644 src/libs/AI21/Generated/JsonConverters.Mode.g.cs delete mode 100644 src/libs/AI21/Generated/JsonConverters.ModeNullable.g.cs diff --git a/src/libs/AI21/Generated/AI21.ILibraryManagementClient.V1LibraryDelete.g.cs b/src/libs/AI21/Generated/AI21.ILibraryManagementClient.V1LibraryDelete.g.cs index 2d75955..3658863 100644 --- a/src/libs/AI21/Generated/AI21.ILibraryManagementClient.V1LibraryDelete.g.cs +++ b/src/libs/AI21/Generated/AI21.ILibraryManagementClient.V1LibraryDelete.g.cs @@ -16,7 +16,7 @@ public partial interface ILibraryManagementClient /// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task V1LibraryDeleteAsync( + global::System.Threading.Tasks.Task V1LibraryDeleteAsync( global::System.Guid fileId, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/AI21/Generated/AI21.ILibraryManagementClient.V1LibraryUpload.g.cs b/src/libs/AI21/Generated/AI21.ILibraryManagementClient.V1LibraryUpload.g.cs index 546ccae..aaf298a 100644 --- a/src/libs/AI21/Generated/AI21.ILibraryManagementClient.V1LibraryUpload.g.cs +++ b/src/libs/AI21/Generated/AI21.ILibraryManagementClient.V1LibraryUpload.g.cs @@ -19,7 +19,7 @@ public partial interface ILibraryManagementClient /// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task V1LibraryUploadAsync( + global::System.Threading.Tasks.Task V1LibraryUploadAsync( global::AI21.BodyV1LibraryUpload request, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default); @@ -44,7 +44,7 @@ public partial interface ILibraryManagementClient /// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task V1LibraryUploadAsync( + global::System.Threading.Tasks.Task V1LibraryUploadAsync( byte[] file, string filename, int? requestStartTime = default, diff --git a/src/libs/AI21/Generated/AI21.IRAGEngineClient.V1LibraryAnswer.g.cs b/src/libs/AI21/Generated/AI21.IRAGEngineClient.V1LibraryAnswer.g.cs deleted file mode 100644 index 70ccb95..0000000 --- a/src/libs/AI21/Generated/AI21.IRAGEngineClient.V1LibraryAnswer.g.cs +++ /dev/null @@ -1,65 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public partial interface IRAGEngineClient - { - /// - /// Answer - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1LibraryAnswerAsync( - global::AI21.LibraryAnswerRequest request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Answer - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// - /// - /// - /// - /// Default Value: AND - /// - /// - /// - /// An enumeration. - /// - /// - /// An enumeration. - /// - /// - /// Default Value: default - /// - /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task V1LibraryAnswerAsync( - string question, - int? requestStartTime = default, - int? maxSegments = default, - string? path = default, - global::System.Collections.Generic.IList? labels = default, - global::AI21.QueryFilter? labelsFilter = default, - global::AI21.LibraryAnswerRequestLabelsFilterMode? labelsFilterMode = default, - global::System.Collections.Generic.IList? fileIds = default, - global::AI21.AnswerLength? answerLength = default, - global::AI21.Mode? mode = default, - global::AI21.RetrievalStrategy? retrievalStrategy = default, - double? retrievalSimilarityThreshold = default, - double? hybridSearchAlpha = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IRAGEngineClient.V1LibrarySearch.g.cs b/src/libs/AI21/Generated/AI21.IRAGEngineClient.V1LibrarySearch.g.cs index 9f6fc40..249013d 100644 --- a/src/libs/AI21/Generated/AI21.IRAGEngineClient.V1LibrarySearch.g.cs +++ b/src/libs/AI21/Generated/AI21.IRAGEngineClient.V1LibrarySearch.g.cs @@ -13,7 +13,7 @@ public partial interface IRAGEngineClient /// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task V1LibrarySearchAsync( + global::System.Threading.Tasks.Task V1LibrarySearchAsync( global::AI21.LibrarySearchRequest request, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default); @@ -43,7 +43,7 @@ public partial interface IRAGEngineClient /// /// The token to cancel the operation with /// - global::System.Threading.Tasks.Task V1LibrarySearchAsync( + global::System.Threading.Tasks.Task V1LibrarySearchAsync( string query, int? requestStartTime = default, int? maxSegments = default, diff --git a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryDelete.g.cs b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryDelete.g.cs index b0896c5..93160ea 100644 --- a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryDelete.g.cs +++ b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryDelete.g.cs @@ -35,7 +35,7 @@ partial void ProcessV1LibraryDeleteResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task V1LibraryDeleteAsync( + public async global::System.Threading.Tasks.Task V1LibraryDeleteAsync( global::System.Guid fileId, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -155,9 +155,7 @@ partial void ProcessV1LibraryDeleteResponseContent( }; } - return - global::AI21.FileDeleteResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return __content; } else { @@ -181,7 +179,7 @@ partial void ProcessV1LibraryDeleteResponseContent( using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - var __responseValue = await global::AI21.FileDeleteResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; return __responseValue ?? diff --git a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryUpload.g.cs b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryUpload.g.cs index eecae42..b63e3d3 100644 --- a/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryUpload.g.cs +++ b/src/libs/AI21/Generated/AI21.LibraryManagementClient.V1LibraryUpload.g.cs @@ -38,7 +38,7 @@ partial void ProcessV1LibraryUploadResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task V1LibraryUploadAsync( + public async global::System.Threading.Tasks.Task V1LibraryUploadAsync( global::AI21.BodyV1LibraryUpload request, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -196,9 +196,7 @@ partial void ProcessV1LibraryUploadResponseContent( }; } - return - global::AI21.FileUploadResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return __content; } else { @@ -222,7 +220,7 @@ partial void ProcessV1LibraryUploadResponseContent( using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - var __responseValue = await global::AI21.FileUploadResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; return __responseValue ?? @@ -250,7 +248,7 @@ partial void ProcessV1LibraryUploadResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task V1LibraryUploadAsync( + public async global::System.Threading.Tasks.Task V1LibraryUploadAsync( byte[] file, string filename, int? requestStartTime = default, diff --git a/src/libs/AI21/Generated/AI21.Models.AnswerLength.g.cs b/src/libs/AI21/Generated/AI21.Models.AnswerLength.g.cs deleted file mode 100644 index 368fc36..0000000 --- a/src/libs/AI21/Generated/AI21.Models.AnswerLength.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// An enumeration. - /// - public enum AnswerLength - { - /// - /// - /// - Short, - /// - /// - /// - Medium, - /// - /// - /// - Long, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class AnswerLengthExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this AnswerLength value) - { - return value switch - { - AnswerLength.Short => "short", - AnswerLength.Medium => "medium", - AnswerLength.Long => "long", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static AnswerLength? ToEnum(string value) - { - return value switch - { - "short" => AnswerLength.Short, - "medium" => AnswerLength.Medium, - "long" => AnswerLength.Long, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.FileDeleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.FileDeleteResponse.g.cs deleted file mode 100644 index 6a57b14..0000000 --- a/src/libs/AI21/Generated/AI21.Models.FileDeleteResponse.g.cs +++ /dev/null @@ -1,60 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class FileDeleteResponse - { - /// - /// 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; } - - /// - /// The RAG library ID of the deleted file. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("fileId")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string FileId { 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. - /// - /// - /// The RAG library ID of the deleted file. - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public FileDeleteResponse( - string id, - string fileId) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); - } - - /// - /// Initializes a new instance of the class. - /// - public FileDeleteResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.FileUploadResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.FileUploadResponse.g.cs deleted file mode 100644 index abec7e0..0000000 --- a/src/libs/AI21/Generated/AI21.Models.FileUploadResponse.g.cs +++ /dev/null @@ -1,64 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class FileUploadResponse - { - /// - /// 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; } - - /// - /// A unique identifier for the uploaded file. Use this later to request, modify metadata,
- /// or delete the file. You don't need to store the value though, as it is returned
- /// along with all file information in any file GET request. Example: da13301a-14e4-4487-aa2f-cc6048e73cdc - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("fileId")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string FileId { 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. - /// - /// - /// A unique identifier for the uploaded file. Use this later to request, modify metadata,
- /// or delete the file. You don't need to store the value though, as it is returned
- /// along with all file information in any file GET request. Example: da13301a-14e4-4487-aa2f-cc6048e73cdc - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public FileUploadResponse( - string id, - string fileId) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); - } - - /// - /// Initializes a new instance of the class. - /// - public FileUploadResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.g.cs deleted file mode 100644 index 7cf0591..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.g.cs +++ /dev/null @@ -1,154 +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 LibraryAnswerRequest - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("question")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Question { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("maxSegments")] - public int? MaxSegments { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("path")] - public string? Path { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("labels")] - public global::System.Collections.Generic.IList? Labels { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("labels_filter")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.QueryFilterJsonConverter))] - public global::AI21.QueryFilter? LabelsFilter { get; set; } - - /// - /// Default Value: AND - /// - [global::System.Text.Json.Serialization.JsonPropertyName("labels_filter_mode")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.LibraryAnswerRequestLabelsFilterModeJsonConverter))] - public global::AI21.LibraryAnswerRequestLabelsFilterMode? LabelsFilterMode { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("fileIds")] - public global::System.Collections.Generic.IList? FileIds { get; set; } - - /// - /// An enumeration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("answerLength")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.AnswerLengthJsonConverter))] - public global::AI21.AnswerLength? AnswerLength { get; set; } - - /// - /// An enumeration. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("mode")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.ModeJsonConverter))] - public global::AI21.Mode? Mode { get; set; } - - /// - /// Default Value: default - /// - [global::System.Text.Json.Serialization.JsonPropertyName("retrievalStrategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.RetrievalStrategyJsonConverter))] - public global::AI21.RetrievalStrategy? RetrievalStrategy { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("retrievalSimilarityThreshold")] - public double? RetrievalSimilarityThreshold { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("hybridSearchAlpha")] - public double? HybridSearchAlpha { 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: AND - /// - /// - /// - /// An enumeration. - /// - /// - /// An enumeration. - /// - /// - /// Default Value: default - /// - /// - /// - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public LibraryAnswerRequest( - string question, - int? maxSegments, - string? path, - global::System.Collections.Generic.IList? labels, - global::AI21.QueryFilter? labelsFilter, - global::AI21.LibraryAnswerRequestLabelsFilterMode? labelsFilterMode, - global::System.Collections.Generic.IList? fileIds, - global::AI21.AnswerLength? answerLength, - global::AI21.Mode? mode, - global::AI21.RetrievalStrategy? retrievalStrategy, - double? retrievalSimilarityThreshold, - double? hybridSearchAlpha) - { - this.Question = question ?? throw new global::System.ArgumentNullException(nameof(question)); - this.MaxSegments = maxSegments; - this.Path = path; - this.Labels = labels; - this.LabelsFilter = labelsFilter; - this.LabelsFilterMode = labelsFilterMode; - this.FileIds = fileIds; - this.AnswerLength = answerLength; - this.Mode = mode; - this.RetrievalStrategy = retrievalStrategy; - this.RetrievalSimilarityThreshold = retrievalSimilarityThreshold; - this.HybridSearchAlpha = hybridSearchAlpha; - } - - /// - /// Initializes a new instance of the class. - /// - public LibraryAnswerRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequestLabelsFilterMode.g.cs b/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequestLabelsFilterMode.g.cs deleted file mode 100644 index d1b9a1c..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequestLabelsFilterMode.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// Default Value: AND - /// - public enum LibraryAnswerRequestLabelsFilterMode - { - /// - /// - /// - AND, - /// - /// - /// - OR, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class LibraryAnswerRequestLabelsFilterModeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this LibraryAnswerRequestLabelsFilterMode value) - { - return value switch - { - LibraryAnswerRequestLabelsFilterMode.AND => "AND", - LibraryAnswerRequestLabelsFilterMode.OR => "OR", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static LibraryAnswerRequestLabelsFilterMode? ToEnum(string value) - { - return value switch - { - "AND" => LibraryAnswerRequestLabelsFilterMode.AND, - "OR" => LibraryAnswerRequestLabelsFilterMode.OR, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.LibraryAnswerResponse.Json.g.cs deleted file mode 100644 index 5896008..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class LibraryAnswerResponse - { - /// - /// 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.LibraryAnswerResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.LibraryAnswerResponse), - jsonSerializerContext) as global::AI21.LibraryAnswerResponse; - } - - /// - /// 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.LibraryAnswerResponse? 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.LibraryAnswerResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LibraryAnswerResponse; - } - - /// - /// 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.LibraryAnswerResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.LibraryAnswerResponse.g.cs deleted file mode 100644 index 7d37d60..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerResponse.g.cs +++ /dev/null @@ -1,76 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class LibraryAnswerResponse - { - /// - /// 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("answerInContext")] - [global::System.Text.Json.Serialization.JsonRequired] - public required bool AnswerInContext { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("answer")] - public string? Answer { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("sources")] - public global::System.Collections.Generic.IList? Sources { 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 LibraryAnswerResponse( - string id, - bool answerInContext, - string? answer, - global::System.Collections.Generic.IList? sources) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.AnswerInContext = answerInContext; - this.Answer = answer; - this.Sources = sources; - } - - /// - /// Initializes a new instance of the class. - /// - public LibraryAnswerResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LibrarySearchResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.LibrarySearchResponse.Json.g.cs deleted file mode 100644 index 7aba548..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LibrarySearchResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class LibrarySearchResponse - { - /// - /// 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.LibrarySearchResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.LibrarySearchResponse), - jsonSerializerContext) as global::AI21.LibrarySearchResponse; - } - - /// - /// 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.LibrarySearchResponse? 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.LibrarySearchResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LibrarySearchResponse; - } - - /// - /// 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.LibrarySearchResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.LibrarySearchResponse.g.cs deleted file mode 100644 index 3aa405b..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LibrarySearchResponse.g.cs +++ /dev/null @@ -1,58 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class LibrarySearchResponse - { - /// - /// 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("results")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Results { 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 LibrarySearchResponse( - string id, - global::System.Collections.Generic.IList results) - { - this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); - this.Results = results ?? throw new global::System.ArgumentNullException(nameof(results)); - } - - /// - /// Initializes a new instance of the class. - /// - public LibrarySearchResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LibrarySearchResult.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.LibrarySearchResult.Json.g.cs deleted file mode 100644 index 838b460..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LibrarySearchResult.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class LibrarySearchResult - { - /// - /// 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.LibrarySearchResult? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.LibrarySearchResult), - jsonSerializerContext) as global::AI21.LibrarySearchResult; - } - - /// - /// 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.LibrarySearchResult? 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.LibrarySearchResult), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LibrarySearchResult; - } - - /// - /// 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.LibrarySearchResult.g.cs b/src/libs/AI21/Generated/AI21.Models.LibrarySearchResult.g.cs deleted file mode 100644 index 4cf67bc..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LibrarySearchResult.g.cs +++ /dev/null @@ -1,99 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class LibrarySearchResult - { - /// - /// - /// - [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("fileId")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string FileId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("fileName")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string FileName { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("score")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double Score { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("order")] - public int? Order { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("publicUrl")] - public string? PublicUrl { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("labels")] - public global::System.Collections.Generic.IList? Labels { 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 LibrarySearchResult( - string text, - string fileId, - string fileName, - double score, - int? order, - string? publicUrl, - global::System.Collections.Generic.IList? labels) - { - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); - this.FileName = fileName ?? throw new global::System.ArgumentNullException(nameof(fileName)); - this.Score = score; - this.Order = order; - this.PublicUrl = publicUrl; - this.Labels = labels; - } - - /// - /// Initializes a new instance of the class. - /// - public LibrarySearchResult() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.Mode.g.cs b/src/libs/AI21/Generated/AI21.Models.Mode.g.cs deleted file mode 100644 index 03f29a1..0000000 --- a/src/libs/AI21/Generated/AI21.Models.Mode.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// An enumeration. - /// - public enum Mode - { - /// - /// - /// - Flexible, - /// - /// - /// - Strict, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ModeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this Mode value) - { - return value switch - { - Mode.Flexible => "flexible", - Mode.Strict => "strict", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static Mode? ToEnum(string value) - { - return value switch - { - "flexible" => Mode.Flexible, - "strict" => Mode.Strict, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.SourceDocument.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.SourceDocument.Json.g.cs deleted file mode 100644 index 97054d3..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SourceDocument.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace AI21 -{ - public sealed partial class SourceDocument - { - /// - /// 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.SourceDocument? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::AI21.SourceDocument), - jsonSerializerContext) as global::AI21.SourceDocument; - } - - /// - /// 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.SourceDocument? 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.SourceDocument), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.SourceDocument; - } - - /// - /// 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.SourceDocument.g.cs b/src/libs/AI21/Generated/AI21.Models.SourceDocument.g.cs deleted file mode 100644 index 8221683..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SourceDocument.g.cs +++ /dev/null @@ -1,80 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// - /// - public sealed partial class SourceDocument - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("fileId")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string FileId { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("highlights")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Highlights { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("publicUrl")] - public string? PublicUrl { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("labels")] - public global::System.Collections.Generic.IList? Labels { 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 SourceDocument( - string fileId, - string name, - global::System.Collections.Generic.IList highlights, - string? publicUrl, - global::System.Collections.Generic.IList? labels) - { - this.FileId = fileId ?? throw new global::System.ArgumentNullException(nameof(fileId)); - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Highlights = highlights ?? throw new global::System.ArgumentNullException(nameof(highlights)); - this.PublicUrl = publicUrl; - this.Labels = labels; - } - - /// - /// Initializes a new instance of the class. - /// - public SourceDocument() - { - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.FileUploadResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1LibraryDeleteResponse.Json.g.cs similarity index 87% rename from src/libs/AI21/Generated/AI21.Models.FileUploadResponse.Json.g.cs rename to src/libs/AI21/Generated/AI21.Models.V1LibraryDeleteResponse.Json.g.cs index 566fbdd..d1f27e3 100644 --- a/src/libs/AI21/Generated/AI21.Models.FileUploadResponse.Json.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.V1LibraryDeleteResponse.Json.g.cs @@ -2,7 +2,7 @@ namespace AI21 { - public sealed partial class FileUploadResponse + public sealed partial class V1LibraryDeleteResponse { /// /// 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.FileUploadResponse? FromJson( + public static global::AI21.V1LibraryDeleteResponse? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::AI21.FileUploadResponse), - jsonSerializerContext) as global::AI21.FileUploadResponse; + typeof(global::AI21.V1LibraryDeleteResponse), + jsonSerializerContext) as global::AI21.V1LibraryDeleteResponse; } /// @@ -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.FileUploadResponse? FromJson( + public static global::AI21.V1LibraryDeleteResponse? 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.FileUploadResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.FileUploadResponse; + typeof(global::AI21.V1LibraryDeleteResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1LibraryDeleteResponse; } /// @@ -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.V1LibraryDeleteResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1LibraryDeleteResponse.g.cs new file mode 100644 index 0000000..484bc36 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.V1LibraryDeleteResponse.g.cs @@ -0,0 +1,27 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class V1LibraryDeleteResponse + { + + /// + /// 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 V1LibraryDeleteResponse( + ) + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.FileDeleteResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1LibrarySearchResponse.Json.g.cs similarity index 87% rename from src/libs/AI21/Generated/AI21.Models.FileDeleteResponse.Json.g.cs rename to src/libs/AI21/Generated/AI21.Models.V1LibrarySearchResponse.Json.g.cs index 82b30c1..1940b8e 100644 --- a/src/libs/AI21/Generated/AI21.Models.FileDeleteResponse.Json.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.V1LibrarySearchResponse.Json.g.cs @@ -2,7 +2,7 @@ namespace AI21 { - public sealed partial class FileDeleteResponse + public sealed partial class V1LibrarySearchResponse { /// /// 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.FileDeleteResponse? FromJson( + public static global::AI21.V1LibrarySearchResponse? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::AI21.FileDeleteResponse), - jsonSerializerContext) as global::AI21.FileDeleteResponse; + typeof(global::AI21.V1LibrarySearchResponse), + jsonSerializerContext) as global::AI21.V1LibrarySearchResponse; } /// @@ -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.FileDeleteResponse? FromJson( + public static global::AI21.V1LibrarySearchResponse? 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.FileDeleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.FileDeleteResponse; + typeof(global::AI21.V1LibrarySearchResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1LibrarySearchResponse; } /// @@ -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.V1LibrarySearchResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1LibrarySearchResponse.g.cs new file mode 100644 index 0000000..8e86395 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.V1LibrarySearchResponse.g.cs @@ -0,0 +1,27 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class V1LibrarySearchResponse + { + + /// + /// 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 V1LibrarySearchResponse( + ) + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.V1LibraryUploadResponse.Json.g.cs similarity index 87% rename from src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.Json.g.cs rename to src/libs/AI21/Generated/AI21.Models.V1LibraryUploadResponse.Json.g.cs index a420154..88238c3 100644 --- a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.Json.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.V1LibraryUploadResponse.Json.g.cs @@ -2,7 +2,7 @@ namespace AI21 { - public sealed partial class LibraryAnswerRequest + public sealed partial class V1LibraryUploadResponse { /// /// 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.LibraryAnswerRequest? FromJson( + public static global::AI21.V1LibraryUploadResponse? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::AI21.LibraryAnswerRequest), - jsonSerializerContext) as global::AI21.LibraryAnswerRequest; + typeof(global::AI21.V1LibraryUploadResponse), + jsonSerializerContext) as global::AI21.V1LibraryUploadResponse; } /// @@ -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.LibraryAnswerRequest? FromJson( + public static global::AI21.V1LibraryUploadResponse? 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.LibraryAnswerRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LibraryAnswerRequest; + typeof(global::AI21.V1LibraryUploadResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.V1LibraryUploadResponse; } /// @@ -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.V1LibraryUploadResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.V1LibraryUploadResponse.g.cs new file mode 100644 index 0000000..566d51a --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.V1LibraryUploadResponse.g.cs @@ -0,0 +1,27 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class V1LibraryUploadResponse + { + + /// + /// 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 V1LibraryUploadResponse( + ) + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryAnswer.g.cs b/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryAnswer.g.cs deleted file mode 100644 index a336288..0000000 --- a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryAnswer.g.cs +++ /dev/null @@ -1,263 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - public partial class RAGEngineClient - { - partial void PrepareV1LibraryAnswerArguments( - global::System.Net.Http.HttpClient httpClient, - ref int? requestStartTime, - global::AI21.LibraryAnswerRequest request); - partial void PrepareV1LibraryAnswerRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - int? requestStartTime, - global::AI21.LibraryAnswerRequest request); - partial void ProcessV1LibraryAnswerResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessV1LibraryAnswerResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Answer - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1LibraryAnswerAsync( - global::AI21.LibraryAnswerRequest request, - int? requestStartTime = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareV1LibraryAnswerArguments( - httpClient: HttpClient, - requestStartTime: ref requestStartTime, - request: request); - - var __pathBuilder = new PathBuilder( - path: "/studio/v1/library/answer", - 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); - PrepareV1LibraryAnswerRequest( - 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); - ProcessV1LibraryAnswerResponse( - 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); - ProcessV1LibraryAnswerResponseContent( - 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.LibraryAnswerResponse.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 __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - - var __responseValue = await global::AI21.LibraryAnswerResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); - - return - __responseValue ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - } - - /// - /// Answer - /// - /// - /// Default Value: 1730898900272 - /// - /// - /// - /// - /// - /// - /// - /// Default Value: AND - /// - /// - /// - /// An enumeration. - /// - /// - /// An enumeration. - /// - /// - /// Default Value: default - /// - /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task V1LibraryAnswerAsync( - string question, - int? requestStartTime = default, - int? maxSegments = default, - string? path = default, - global::System.Collections.Generic.IList? labels = default, - global::AI21.QueryFilter? labelsFilter = default, - global::AI21.LibraryAnswerRequestLabelsFilterMode? labelsFilterMode = default, - global::System.Collections.Generic.IList? fileIds = default, - global::AI21.AnswerLength? answerLength = default, - global::AI21.Mode? mode = default, - global::AI21.RetrievalStrategy? retrievalStrategy = default, - double? retrievalSimilarityThreshold = default, - double? hybridSearchAlpha = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::AI21.LibraryAnswerRequest - { - Question = question, - MaxSegments = maxSegments, - Path = path, - Labels = labels, - LabelsFilter = labelsFilter, - LabelsFilterMode = labelsFilterMode, - FileIds = fileIds, - AnswerLength = answerLength, - Mode = mode, - RetrievalStrategy = retrievalStrategy, - RetrievalSimilarityThreshold = retrievalSimilarityThreshold, - HybridSearchAlpha = hybridSearchAlpha, - }; - - return await V1LibraryAnswerAsync( - requestStartTime: requestStartTime, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs b/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs index 98264de..1a54cf2 100644 --- a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs +++ b/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibrarySearch.g.cs @@ -32,7 +32,7 @@ partial void ProcessV1LibrarySearchResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task V1LibrarySearchAsync( + public async global::System.Threading.Tasks.Task V1LibrarySearchAsync( global::AI21.LibrarySearchRequest request, int? requestStartTime = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -160,9 +160,7 @@ partial void ProcessV1LibrarySearchResponseContent( }; } - return - global::AI21.LibrarySearchResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return __content; } else { @@ -186,7 +184,7 @@ partial void ProcessV1LibrarySearchResponseContent( using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - var __responseValue = await global::AI21.LibrarySearchResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; return __responseValue ?? @@ -219,7 +217,7 @@ partial void ProcessV1LibrarySearchResponseContent( /// /// The token to cancel the operation with /// - public async global::System.Threading.Tasks.Task V1LibrarySearchAsync( + public async global::System.Threading.Tasks.Task V1LibrarySearchAsync( string query, int? requestStartTime = default, int? maxSegments = default, diff --git a/src/libs/AI21/Generated/JsonConverters.AnswerLength.g.cs b/src/libs/AI21/Generated/JsonConverters.AnswerLength.g.cs deleted file mode 100644 index 9c6ab59..0000000 --- a/src/libs/AI21/Generated/JsonConverters.AnswerLength.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class AnswerLengthJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.AnswerLength Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::AI21.AnswerLengthExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.AnswerLength)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.AnswerLength value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::AI21.AnswerLengthExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.AnswerLengthNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.AnswerLengthNullable.g.cs deleted file mode 100644 index 572618a..0000000 --- a/src/libs/AI21/Generated/JsonConverters.AnswerLengthNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class AnswerLengthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.AnswerLength? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::AI21.AnswerLengthExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.AnswerLength)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.AnswerLength? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::AI21.AnswerLengthExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterMode.g.cs b/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterMode.g.cs deleted file mode 100644 index 57bbb55..0000000 --- a/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterMode.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class LibraryAnswerRequestLabelsFilterModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.LibraryAnswerRequestLabelsFilterMode Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::AI21.LibraryAnswerRequestLabelsFilterModeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.LibraryAnswerRequestLabelsFilterMode)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.LibraryAnswerRequestLabelsFilterMode value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::AI21.LibraryAnswerRequestLabelsFilterModeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterModeNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterModeNullable.g.cs deleted file mode 100644 index 1df17ae..0000000 --- a/src/libs/AI21/Generated/JsonConverters.LibraryAnswerRequestLabelsFilterModeNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class LibraryAnswerRequestLabelsFilterModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.LibraryAnswerRequestLabelsFilterMode? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::AI21.LibraryAnswerRequestLabelsFilterModeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.LibraryAnswerRequestLabelsFilterMode)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.LibraryAnswerRequestLabelsFilterMode? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::AI21.LibraryAnswerRequestLabelsFilterModeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.Mode.g.cs b/src/libs/AI21/Generated/JsonConverters.Mode.g.cs deleted file mode 100644 index 36d4a79..0000000 --- a/src/libs/AI21/Generated/JsonConverters.Mode.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class ModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.Mode Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::AI21.ModeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.Mode)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.Mode value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::AI21.ModeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/AI21/Generated/JsonConverters.ModeNullable.g.cs b/src/libs/AI21/Generated/JsonConverters.ModeNullable.g.cs deleted file mode 100644 index aac4416..0000000 --- a/src/libs/AI21/Generated/JsonConverters.ModeNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace AI21.JsonConverters -{ - /// - public sealed class ModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::AI21.Mode? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::AI21.ModeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::AI21.Mode)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.Mode? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::AI21.ModeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/AI21/Generated/JsonSerializerContext.g.cs b/src/libs/AI21/Generated/JsonSerializerContext.g.cs index aba8bd9..fbce70f 100644 --- a/src/libs/AI21/Generated/JsonSerializerContext.g.cs +++ b/src/libs/AI21/Generated/JsonSerializerContext.g.cs @@ -13,8 +13,6 @@ namespace AI21 DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, Converters = new global::System.Type[] { - typeof(global::AI21.JsonConverters.AnswerLengthJsonConverter), - typeof(global::AI21.JsonConverters.AnswerLengthNullableJsonConverter), typeof(global::AI21.JsonConverters.AssistantMessageRoleJsonConverter), typeof(global::AI21.JsonConverters.AssistantMessageRoleNullableJsonConverter), typeof(global::AI21.JsonConverters.ToolCallTypeJsonConverter), @@ -37,14 +35,10 @@ namespace AI21 typeof(global::AI21.JsonConverters.FileStatusNullableJsonConverter), typeof(global::AI21.JsonConverters.ToolParametersTypeJsonConverter), typeof(global::AI21.JsonConverters.ToolParametersTypeNullableJsonConverter), - typeof(global::AI21.JsonConverters.LibraryAnswerRequestLabelsFilterModeJsonConverter), - typeof(global::AI21.JsonConverters.LibraryAnswerRequestLabelsFilterModeNullableJsonConverter), - typeof(global::AI21.JsonConverters.ModeJsonConverter), - typeof(global::AI21.JsonConverters.ModeNullableJsonConverter), - typeof(global::AI21.JsonConverters.RetrievalStrategyJsonConverter), - typeof(global::AI21.JsonConverters.RetrievalStrategyNullableJsonConverter), typeof(global::AI21.JsonConverters.LibrarySearchRequestLabelsFilterModeJsonConverter), typeof(global::AI21.JsonConverters.LibrarySearchRequestLabelsFilterModeNullableJsonConverter), + typeof(global::AI21.JsonConverters.RetrievalStrategyJsonConverter), + typeof(global::AI21.JsonConverters.RetrievalStrategyNullableJsonConverter), typeof(global::AI21.JsonConverters.ModelNameJsonConverter), typeof(global::AI21.JsonConverters.ModelNameNullableJsonConverter), typeof(global::AI21.JsonConverters.StyleTypeJsonConverter), diff --git a/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs b/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs index f0d38f6..3c06235 100644 --- a/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs @@ -18,534 +18,486 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::AI21.AnswerLength? Type0 { get; set; } + public global::AI21.AssistantMessage? Type0 { get; set; } /// /// /// - public global::AI21.AssistantMessage? Type1 { get; set; } + public global::AI21.AssistantMessageRole? Type1 { get; set; } /// /// /// - public global::AI21.AssistantMessageRole? Type2 { get; set; } + public string? Type2 { get; set; } /// /// /// - public string? Type3 { get; set; } + public global::System.Collections.Generic.IList? Type3 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type4 { get; set; } + public global::AI21.ToolCall? Type4 { get; set; } /// /// /// - public global::AI21.ToolCall? Type5 { get; set; } + public global::AI21.ToolCallType? Type5 { get; set; } /// /// /// - public global::AI21.ToolCallType? Type6 { get; set; } + public global::AI21.ToolFunction? Type6 { get; set; } /// /// /// - public global::AI21.ToolFunction? Type7 { get; set; } + public global::AI21.BodyConvertDocumentFileStudioV1ChatFilesConvertPost? Type7 { get; set; } /// /// /// - public global::AI21.BodyConvertDocumentFileStudioV1ChatFilesConvertPost? Type8 { get; set; } + public global::System.Collections.Generic.IList? Type8 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type9 { get; set; } + public byte[]? Type9 { get; set; } /// /// /// - public byte[]? Type10 { get; set; } + public global::AI21.BodyV1LibraryUpload? Type10 { get; set; } /// /// /// - public global::AI21.BodyV1LibraryUpload? Type11 { get; set; } + public global::System.Collections.Generic.IList? Type11 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type12 { get; set; } + public global::AI21.ChatCompletion? Type12 { get; set; } /// /// /// - public global::AI21.ChatCompletion? Type13 { get; set; } + public global::System.Collections.Generic.IList? Type13 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type14 { get; set; } + public global::AI21.ChatCompletionResponseChoice? Type14 { get; set; } /// /// /// - public global::AI21.ChatCompletionResponseChoice? Type15 { get; set; } + public int? Type15 { get; set; } /// /// /// - public int? Type16 { get; set; } + public global::AI21.Logprobs? Type16 { get; set; } /// /// /// - public global::AI21.Logprobs? Type17 { get; set; } + public global::System.Collections.Generic.IList? Type17 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type18 { get; set; } + public global::AI21.LogprobsData? Type18 { get; set; } /// /// /// - public global::AI21.LogprobsData? Type19 { get; set; } + public double? Type19 { get; set; } /// /// /// - public double? Type20 { get; set; } + public global::System.Collections.Generic.IList? Type20 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type21 { get; set; } + public global::AI21.TopLogprobsData? Type21 { get; set; } /// /// /// - public global::AI21.TopLogprobsData? Type22 { get; set; } + public global::AI21.UsageInfo? Type22 { get; set; } /// /// /// - public global::AI21.UsageInfo? Type23 { get; set; } + public object? Type23 { get; set; } /// /// /// - public object? Type24 { get; set; } + public global::AI21.ChatCompletionResponseDeltaChoice? Type24 { get; set; } /// /// /// - public global::AI21.ChatCompletionResponseDeltaChoice? Type25 { get; set; } + public global::AI21.AnyOf? Type25 { get; set; } /// /// /// - public global::AI21.AnyOf? Type26 { get; set; } + public global::AI21.ChatStreamingFirstDelta? Type26 { get; set; } /// /// /// - public global::AI21.ChatStreamingFirstDelta? Type27 { get; set; } + public global::AI21.ChatStreamingFirstDeltaRole? Type27 { get; set; } /// /// /// - public global::AI21.ChatStreamingFirstDeltaRole? Type28 { get; set; } + public global::AI21.ChatStreamingContentDelta? Type28 { get; set; } /// /// /// - public global::AI21.ChatStreamingContentDelta? Type29 { get; set; } + public global::AI21.ChatCompletionVllmStreamingMessage? Type29 { get; set; } /// /// /// - public global::AI21.ChatCompletionVllmStreamingMessage? Type30 { get; set; } + public global::System.Collections.Generic.IList? Type30 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type31 { get; set; } + public global::AI21.ChatMessage? Type31 { get; set; } /// /// /// - public global::AI21.ChatMessage? Type32 { get; set; } + public global::AI21.RoleType? Type32 { get; set; } /// /// /// - public global::AI21.RoleType? Type33 { get; set; } + public global::AI21.ChatOutput? Type33 { get; set; } /// /// /// - public global::AI21.ChatOutput? Type34 { get; set; } + public global::AI21.FinishReason? Type34 { get; set; } /// /// /// - public global::AI21.FinishReason? Type35 { get; set; } + public global::AI21.ChatResponse? Type35 { get; set; } /// /// /// - public global::AI21.ChatResponse? Type36 { get; set; } + public global::System.Collections.Generic.IList? Type36 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type37 { get; set; } + public global::AI21.CompletionBody? Type37 { get; set; } /// /// /// - public global::AI21.CompletionBody? Type38 { get; set; } + public global::AI21.Penalty? Type38 { get; set; } /// /// /// - public global::AI21.Penalty? Type39 { get; set; } + public bool? Type39 { get; set; } /// /// /// - public bool? Type40 { get; set; } + public global::AI21.ConnectorsDataSources? Type40 { get; set; } /// /// /// - public global::AI21.ConnectorsDataSources? Type41 { get; set; } + public global::System.Collections.Generic.IList? Type41 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type42 { get; set; } + public global::AI21.DataSourceMetadata? Type42 { get; set; } /// /// /// - public global::AI21.DataSourceMetadata? Type43 { get; set; } + public global::AI21.ConnectorsStatus? Type43 { get; set; } /// /// /// - public global::AI21.ConnectorsStatus? Type44 { get; set; } + public global::AI21.ConnectorsWorkflowStatus? Type44 { get; set; } /// /// /// - public global::AI21.ConnectorsWorkflowStatus? Type45 { get; set; } + public global::AI21.ConnectorsToken? Type45 { get; set; } /// /// /// - public global::AI21.ConnectorsToken? Type46 { get; set; } + public global::AI21.ConversationalRagConfig? Type46 { get; set; } /// /// /// - public global::AI21.ConversationalRagConfig? Type47 { get; set; } + public global::System.Collections.Generic.IList? Type47 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type48 { get; set; } + public global::AI21.Message? Type48 { get; set; } /// /// /// - public global::AI21.Message? Type49 { get; set; } + public global::AI21.MessageRole? Type49 { get; set; } /// /// /// - public global::AI21.MessageRole? Type50 { get; set; } + public global::AI21.ConversationalRagConfigRetrievalStrategy? Type50 { get; set; } /// /// /// - public global::AI21.ConversationalRagConfigRetrievalStrategy? Type51 { get; set; } + public global::AI21.ConversationalRagResult? Type51 { get; set; } /// /// /// - public global::AI21.ConversationalRagResult? Type52 { get; set; } + public global::System.Collections.Generic.IList? Type52 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type53 { get; set; } + public global::AI21.ConversationalRagSource? Type53 { get; set; } /// /// /// - public global::AI21.ConversationalRagSource? Type54 { get; set; } + public global::AI21.CustomModelInput? Type54 { get; set; } /// /// /// - public global::AI21.CustomModelInput? Type55 { get; set; } + public global::AI21.CustomModelType? Type55 { get; set; } /// /// /// - public global::AI21.CustomModelType? Type56 { get; set; } + public global::AI21.CustomModelUpdateBody? Type56 { get; set; } /// /// /// - public global::AI21.CustomModelUpdateBody? Type57 { get; set; } + public global::AI21.DocumentSchema? Type57 { get; set; } /// /// /// - public global::AI21.DocumentSchema? Type58 { get; set; } + public global::System.Collections.Generic.Dictionary? Type58 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type59 { get; set; } + public global::AI21.DocumentType? Type59 { get; set; } /// /// /// - public global::AI21.DocumentType? Type60 { get; set; } + public global::AI21.FileResponse? Type60 { get; set; } /// /// /// - public global::AI21.FileDeleteResponse? Type61 { get; set; } + public global::System.Guid? Type61 { get; set; } /// /// /// - public global::AI21.FileResponse? Type62 { get; set; } + public global::System.DateTime? Type62 { get; set; } /// /// /// - public global::System.Guid? Type63 { get; set; } + public global::AI21.FileStatus? Type63 { get; set; } /// /// /// - public global::System.DateTime? Type64 { get; set; } + public global::AI21.FilesUpdateRequest? Type64 { get; set; } /// /// /// - public global::AI21.FileStatus? Type65 { get; set; } + public global::AI21.FunctionToolDefinition? Type65 { get; set; } /// /// /// - public global::AI21.FileUploadResponse? Type66 { get; set; } + public global::AI21.ToolParameters? Type66 { get; set; } /// /// /// - public global::AI21.FilesUpdateRequest? Type67 { get; set; } + public global::AI21.ToolParametersType? Type67 { get; set; } /// /// /// - public global::AI21.FunctionToolDefinition? Type68 { get; set; } + public global::AI21.HTTPValidationError? Type68 { get; set; } /// /// /// - public global::AI21.ToolParameters? Type69 { get; set; } + public global::System.Collections.Generic.IList? Type69 { get; set; } /// /// /// - public global::AI21.ToolParametersType? Type70 { get; set; } + public global::AI21.ValidationError? Type70 { get; set; } /// /// /// - public global::AI21.HTTPValidationError? Type71 { get; set; } + public global::System.Collections.Generic.IList>? Type71 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type72 { get; set; } + public global::AI21.AnyOf? Type72 { get; set; } /// /// /// - public global::AI21.ValidationError? Type73 { get; set; } + public global::AI21.Highlight? Type73 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type74 { get; set; } + public global::AI21.LibrarySearchRequest? Type74 { get; set; } /// /// /// - public global::AI21.AnyOf? Type75 { get; set; } + public global::AI21.QueryFilter? Type75 { get; set; } /// /// /// - public global::AI21.Highlight? Type76 { get; set; } + public global::System.Collections.Generic.Dictionary>? Type76 { get; set; } /// /// /// - public global::AI21.LibraryAnswerRequest? Type77 { get; set; } + public global::System.Collections.Generic.IList? Type77 { get; set; } /// /// /// - public global::AI21.QueryFilter? Type78 { get; set; } + public global::System.Collections.Generic.Dictionary? Type78 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary>? Type79 { get; set; } + public global::AI21.LibrarySearchRequestLabelsFilterMode? Type79 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type80 { get; set; } + public global::System.Collections.Generic.IList? Type80 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type81 { get; set; } + public global::AI21.RetrievalStrategy? Type81 { get; set; } /// /// /// - public global::AI21.LibraryAnswerRequestLabelsFilterMode? Type82 { get; set; } + public global::AI21.MockResponseConfig? Type82 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type83 { get; set; } + public global::AI21.ModelName? Type83 { get; set; } /// /// /// - public global::AI21.Mode? Type84 { get; set; } + public global::AI21.ParaphraseBody? Type84 { get; set; } /// /// /// - public global::AI21.RetrievalStrategy? Type85 { get; set; } + public global::AI21.StyleType? Type85 { get; set; } /// /// /// - public global::AI21.LibraryAnswerResponse? Type86 { get; set; } + public global::AI21.ResponseFormat? Type86 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type87 { get; set; } + public global::AI21.ResponseFormatType? Type87 { get; set; } /// /// /// - public global::AI21.SourceDocument? Type88 { get; set; } + public global::AI21.Segment? Type88 { get; set; } /// /// /// - public global::AI21.LibrarySearchRequest? Type89 { get; set; } + public global::AI21.SegmentSummary? Type89 { get; set; } /// /// /// - public global::AI21.LibrarySearchRequestLabelsFilterMode? Type90 { get; set; } + public global::System.Collections.Generic.IList? Type90 { get; set; } /// /// /// - public global::AI21.LibrarySearchResponse? Type91 { get; set; } + public global::AI21.SegmentationBody? Type91 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type92 { get; set; } + public global::AI21.SegmentationResponse? Type92 { get; set; } /// /// /// - public global::AI21.LibrarySearchResult? Type93 { get; set; } + public global::System.Collections.Generic.IList? Type93 { get; set; } /// /// /// - public global::AI21.MockResponseConfig? Type94 { get; set; } + public global::AI21.SegmentedSummaryBody? Type94 { get; set; } /// /// /// - public global::AI21.ModelName? Type95 { get; set; } + public global::AI21.SummarizationResponse? Type95 { get; set; } /// /// /// - public global::AI21.ParaphraseBody? Type96 { get; set; } + public global::AI21.SummarizeBody? Type96 { get; set; } /// /// /// - public global::AI21.StyleType? Type97 { get; set; } + public global::AI21.SummaryMethod? Type97 { get; set; } /// /// /// - public global::AI21.ResponseFormat? Type98 { get; set; } + public global::AI21.SummarizeBySegmentResponse? Type98 { get; set; } /// /// /// - public global::AI21.ResponseFormatType? Type99 { get; set; } + public global::System.Collections.Generic.IList? Type99 { get; set; } /// /// /// - public global::AI21.Segment? Type100 { get; set; } + public global::AI21.SystemMessage? Type100 { get; set; } /// /// /// - public global::AI21.SegmentSummary? Type101 { get; set; } + public global::AI21.SystemMessageRole? Type101 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type102 { get; set; } + public global::AI21.ToolDefinition? Type102 { get; set; } /// /// /// - public global::AI21.SegmentationBody? Type103 { get; set; } + public global::AI21.ToolDefinitionType? Type103 { get; set; } /// /// /// - public global::AI21.SegmentationResponse? Type104 { get; set; } + public global::AI21.ToolMessage? Type104 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type105 { get; set; } + public global::AI21.ToolMessageRole? Type105 { get; set; } /// /// /// - public global::AI21.SegmentedSummaryBody? Type106 { get; set; } + public global::AI21.UserMessage? Type106 { get; set; } /// /// /// - public global::AI21.SummarizationResponse? Type107 { get; set; } + public global::AI21.UserMessageRole? Type107 { get; set; } /// /// /// - public global::AI21.SummarizeBody? Type108 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesChatChatRequest? Type108 { get; set; } /// /// /// - public global::AI21.SummaryMethod? Type109 { get; set; } + public global::System.Collections.Generic.IList? Type109 { get; set; } /// /// /// - public global::AI21.SummarizeBySegmentResponse? Type110 { get; set; } + public global::AI21.MessagesItem? Type110 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type111 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator? Type111 { get; set; } /// /// /// - public global::AI21.SystemMessage? Type112 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? Type112 { get; set; } /// /// /// - public global::AI21.SystemMessageRole? Type113 { get; set; } + public global::System.Collections.Generic.IList? Type113 { get; set; } /// /// /// - public global::AI21.ToolDefinition? Type114 { get; set; } + public global::AI21.AnyOf>? Type114 { get; set; } /// /// /// - public global::AI21.ToolDefinitionType? Type115 { get; set; } + public global::System.Collections.Generic.IList? Type115 { get; set; } /// /// /// - public global::AI21.ToolMessage? Type116 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest? Type116 { get; set; } /// /// /// - public global::AI21.ToolMessageRole? Type117 { get; set; } + public global::System.Collections.Generic.IList? Type117 { get; set; } /// /// /// - public global::AI21.UserMessage? Type118 { get; set; } + public global::AI21.AnyOf>? Type118 { get; set; } /// /// /// - public global::AI21.UserMessageRole? Type119 { get; set; } + public global::System.Collections.Generic.IList? Type119 { get; set; } /// /// /// - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequest? Type120 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type121 { get; set; } - /// - /// - /// - public global::AI21.MessagesItem? Type122 { get; set; } - /// - /// - /// - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator? Type123 { get; set; } - /// - /// - /// - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? Type124 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type125 { get; set; } - /// - /// - /// - public global::AI21.AnyOf>? Type126 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type127 { get; set; } - /// - /// - /// - public global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest? Type128 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type129 { get; set; } - /// - /// - /// - public global::AI21.AnyOf>? Type130 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type131 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type132 { get; set; } + public global::System.Collections.Generic.IList? Type120 { get; set; } } } \ No newline at end of file diff --git a/src/libs/AI21/openapi.yaml b/src/libs/AI21/openapi.yaml index c6bfac8..17868dd 100644 --- a/src/libs/AI21/openapi.yaml +++ b/src/libs/AI21/openapi.yaml @@ -1072,8 +1072,7 @@ paths: description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/FileUploadResponse' + schema: { } '422': description: Validation Error content: @@ -1177,40 +1176,7 @@ paths: description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/FileDeleteResponse' - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' - /studio/v1/library/answer: - post: - tags: - - RAG Engine - summary: Answer - operationId: v1_library_answer - parameters: - - name: request_start_time - in: query - schema: - title: Request Start Time - type: integer - default: '1730898900272' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LibraryAnswerRequest' - required: true - responses: - '200': - description: Successful Response - content: - application/json: - schema: - $ref: '#/components/schemas/LibraryAnswerResponse' + schema: { } '422': description: Validation Error content: @@ -1241,8 +1207,7 @@ paths: description: Successful Response content: application/json: - schema: - $ref: '#/components/schemas/LibrarySearchResponse' + schema: { } '422': description: Validation Error content: @@ -1419,13 +1384,6 @@ paths: $ref: '#/components/schemas/HTTPValidationError' components: schemas: - AnswerLength: - title: AnswerLength - enum: - - short - - medium - - long - description: An enumeration. AssistantMessage: title: AssistantMessage type: object @@ -1976,21 +1934,6 @@ components: - TEXT type: string description: An enumeration. - FileDeleteResponse: - title: FileDeleteResponse - required: - - id - - fileId - type: object - properties: - id: - title: Id - type: string - description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" - fileId: - title: Fileid - type: string - description: The RAG library ID of the deleted file. FileResponse: title: FileResponse required: @@ -2064,21 +2007,6 @@ components: - PROCESSING_FAILED type: string description: An enumeration. - FileUploadResponse: - title: FileUploadResponse - required: - - id - - fileId - type: object - properties: - id: - title: Id - type: string - description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" - fileId: - title: Fileid - type: string - description: "A unique identifier for the uploaded file. Use this later to request, modify metadata,\nor delete the file. You don't need to store the value though, as it is returned\nalong with all file information in any file GET request. Example: da13301a-14e4-4487-aa2f-cc6048e73cdc\n" FilesUpdateRequest: title: FilesUpdateRequest type: object @@ -2148,82 +2076,6 @@ components: endIndex: title: Endindex type: integer - LibraryAnswerRequest: - title: LibraryAnswerRequest - required: - - question - type: object - properties: - question: - title: Question - type: string - maxSegments: - title: Maxsegments - type: integer - path: - title: Path - type: string - labels: - title: Labels - type: array - items: - type: string - labels_filter: - $ref: '#/components/schemas/QueryFilter' - labels_filter_mode: - title: Labels Filter Mode - enum: - - AND - - OR - type: string - default: AND - fileIds: - title: Fileids - type: array - items: - type: string - format: uuid - answerLength: - $ref: '#/components/schemas/AnswerLength' - mode: - $ref: '#/components/schemas/Mode' - retrievalStrategy: - allOf: - - $ref: '#/components/schemas/RetrievalStrategy' - default: default - retrievalSimilarityThreshold: - title: Retrievalsimilaritythreshold - maximum: 1.5 - minimum: 0.5 - type: number - hybridSearchAlpha: - title: Hybridsearchalpha - maximum: 1.0 - minimum: 0.0 - type: number - description: This class is to be used as a common class to all Studio API requests payloads - LibraryAnswerResponse: - title: LibraryAnswerResponse - required: - - id - - answerInContext - type: object - properties: - id: - title: Id - type: string - description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" - answerInContext: - title: Answerincontext - type: boolean - answer: - title: Answer - type: string - sources: - title: Sources - type: array - items: - $ref: '#/components/schemas/SourceDocument' LibrarySearchRequest: title: LibrarySearchRequest required: @@ -2278,54 +2130,6 @@ components: minimum: 0.0 type: number description: This class is to be used as a common class to all Studio API requests payloads - LibrarySearchResponse: - title: LibrarySearchResponse - required: - - id - - results - type: object - properties: - id: - title: Id - type: string - description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" - results: - title: Results - type: array - items: - $ref: '#/components/schemas/LibrarySearchResult' - LibrarySearchResult: - title: LibrarySearchResult - required: - - text - - fileId - - fileName - - score - type: object - properties: - text: - title: Text - type: string - fileId: - title: Fileid - type: string - fileName: - title: Filename - type: string - score: - title: Score - type: number - order: - title: Order - type: integer - publicUrl: - title: Publicurl - type: string - labels: - title: Labels - type: array - items: - type: string LogicalOperator: title: LogicalOperator type: object @@ -2393,12 +2197,6 @@ components: minimum: 0.0 type: number default: 0.1 - Mode: - title: Mode - enum: - - flexible - - strict - description: An enumeration. ModelName: title: ModelName enum: @@ -2580,33 +2378,6 @@ components: title: Focus type: string description: This class is to be used as a common class to all Studio API requests payloads - SourceDocument: - title: SourceDocument - required: - - fileId - - name - - highlights - type: object - properties: - fileId: - title: Fileid - type: string - name: - title: Name - type: string - highlights: - title: Highlights - type: array - items: - type: string - publicUrl: - title: Publicurl - type: string - labels: - title: Labels - type: array - items: - type: string StyleType: title: StyleType enum: