From 8ff57ce2807cb8b2cddf3d235041212cbc4cdad7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 12 Nov 2024 09:21:40 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...AI21.IRAGEngineClient.V1LibraryAnswer.g.cs | 65 ---- .../Generated/AI21.Models.AnswerLength.g.cs | 57 ---- .../AI21.Models.LibraryAnswerRequest.g.cs | 182 ------------ ....LibraryAnswerRequestLabelsFilterMode.g.cs | 51 ---- .../AI21.Models.LibraryAnswerResponse.g.cs | 132 --------- src/libs/AI21/Generated/AI21.Models.Mode.g.cs | 51 ---- .../Generated/AI21.Models.SourceDocument.g.cs | 137 --------- .../AI21.RAGEngineClient.V1LibraryAnswer.g.cs | 194 ------------ .../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 | 280 ++++++++---------- src/libs/AI21/openapi.yaml | 148 --------- 17 files changed, 128 insertions(+), 1494 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.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.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.Mode.g.cs delete mode 100644 src/libs/AI21/Generated/AI21.Models.SourceDocument.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.IRAGEngineClient.V1LibraryAnswer.g.cs b/src/libs/AI21/Generated/AI21.IRAGEngineClient.V1LibraryAnswer.g.cs deleted file mode 100644 index e1105c8..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.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.LibraryAnswerRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.g.cs deleted file mode 100644 index 434e66c..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerRequest.g.cs +++ /dev/null @@ -1,182 +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(); - - - /// - /// 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.LibraryAnswerRequest? 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; - } - - /// - /// 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.LibraryAnswerRequest? 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 FromJsonStream( - 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; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - - } -} \ 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.g.cs b/src/libs/AI21/Generated/AI21.Models.LibraryAnswerResponse.g.cs deleted file mode 100644 index fe6ba59..0000000 --- a/src/libs/AI21/Generated/AI21.Models.LibraryAnswerResponse.g.cs +++ /dev/null @@ -1,132 +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(); - - - /// - /// 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 FromJsonStream( - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - - } -} \ 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.g.cs b/src/libs/AI21/Generated/AI21.Models.SourceDocument.g.cs deleted file mode 100644 index 9f07ee4..0000000 --- a/src/libs/AI21/Generated/AI21.Models.SourceDocument.g.cs +++ /dev/null @@ -1,137 +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(); - - - /// - /// 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 FromJsonStream( - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - - } -} \ 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 b569300..0000000 --- a/src/libs/AI21/Generated/AI21.RAGEngineClient.V1LibraryAnswer.g.cs +++ /dev/null @@ -1,194 +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); - - 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::System.InvalidOperationException(__content, __ex); - } - - return - global::AI21.LibraryAnswerResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - - /// - /// 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/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..d66c3dc 100644 --- a/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/AI21/Generated/JsonSerializerContextTypes.g.cs @@ -18,534 +18,506 @@ 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.FileDeleteResponse? Type60 { get; set; } /// /// /// - public global::AI21.FileDeleteResponse? Type61 { get; set; } + public global::AI21.FileResponse? Type61 { get; set; } /// /// /// - public global::AI21.FileResponse? Type62 { get; set; } + public global::System.Guid? Type62 { get; set; } /// /// /// - public global::System.Guid? Type63 { get; set; } + public global::System.DateTime? Type63 { get; set; } /// /// /// - public global::System.DateTime? Type64 { get; set; } + public global::AI21.FileStatus? Type64 { get; set; } /// /// /// - public global::AI21.FileStatus? Type65 { get; set; } + public global::AI21.FileUploadResponse? Type65 { get; set; } /// /// /// - public global::AI21.FileUploadResponse? Type66 { get; set; } + public global::AI21.FilesUpdateRequest? Type66 { get; set; } /// /// /// - public global::AI21.FilesUpdateRequest? Type67 { get; set; } + public global::AI21.FunctionToolDefinition? Type67 { get; set; } /// /// /// - public global::AI21.FunctionToolDefinition? Type68 { get; set; } + public global::AI21.ToolParameters? Type68 { get; set; } /// /// /// - public global::AI21.ToolParameters? Type69 { get; set; } + public global::AI21.ToolParametersType? Type69 { get; set; } /// /// /// - public global::AI21.ToolParametersType? Type70 { get; set; } + public global::AI21.HTTPValidationError? 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.ValidationError? Type72 { get; set; } /// /// /// - public global::AI21.ValidationError? Type73 { get; set; } + public global::System.Collections.Generic.IList>? Type73 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type74 { get; set; } + public global::AI21.AnyOf? Type74 { get; set; } /// /// /// - public global::AI21.AnyOf? Type75 { get; set; } + public global::AI21.Highlight? Type75 { get; set; } /// /// /// - public global::AI21.Highlight? Type76 { get; set; } + public global::AI21.LibrarySearchRequest? Type76 { get; set; } /// /// /// - public global::AI21.LibraryAnswerRequest? Type77 { get; set; } + public global::AI21.QueryFilter? 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::System.Collections.Generic.IList? Type79 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type80 { get; set; } + public global::System.Collections.Generic.Dictionary? Type80 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type81 { get; set; } + public global::AI21.LibrarySearchRequestLabelsFilterMode? Type81 { get; set; } /// /// /// - public global::AI21.LibraryAnswerRequestLabelsFilterMode? Type82 { get; set; } + public global::System.Collections.Generic.IList? Type82 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type83 { get; set; } + public global::AI21.RetrievalStrategy? Type83 { get; set; } /// /// /// - public global::AI21.Mode? Type84 { get; set; } + public global::AI21.LibrarySearchResponse? Type84 { get; set; } /// /// /// - public global::AI21.RetrievalStrategy? Type85 { get; set; } + public global::System.Collections.Generic.IList? Type85 { get; set; } /// /// /// - public global::AI21.LibraryAnswerResponse? Type86 { get; set; } + public global::AI21.LibrarySearchResult? Type86 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type87 { get; set; } + public global::AI21.MockResponseConfig? Type87 { get; set; } /// /// /// - public global::AI21.SourceDocument? Type88 { get; set; } + public global::AI21.ModelName? Type88 { get; set; } /// /// /// - public global::AI21.LibrarySearchRequest? Type89 { get; set; } + public global::AI21.ParaphraseBody? Type89 { get; set; } /// /// /// - public global::AI21.LibrarySearchRequestLabelsFilterMode? Type90 { get; set; } + public global::AI21.StyleType? Type90 { get; set; } /// /// /// - public global::AI21.LibrarySearchResponse? Type91 { get; set; } + public global::AI21.ResponseFormat? Type91 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type92 { get; set; } + public global::AI21.ResponseFormatType? Type92 { get; set; } /// /// /// - public global::AI21.LibrarySearchResult? Type93 { get; set; } + public global::AI21.Segment? Type93 { get; set; } /// /// /// - public global::AI21.MockResponseConfig? Type94 { get; set; } + public global::AI21.SegmentSummary? Type94 { get; set; } /// /// /// - public global::AI21.ModelName? Type95 { get; set; } + public global::System.Collections.Generic.IList? Type95 { get; set; } /// /// /// - public global::AI21.ParaphraseBody? Type96 { get; set; } + public global::AI21.SegmentationBody? Type96 { get; set; } /// /// /// - public global::AI21.StyleType? Type97 { get; set; } + public global::AI21.SegmentationResponse? Type97 { get; set; } /// /// /// - public global::AI21.ResponseFormat? Type98 { get; set; } + public global::System.Collections.Generic.IList? Type98 { get; set; } /// /// /// - public global::AI21.ResponseFormatType? Type99 { get; set; } + public global::AI21.SegmentedSummaryBody? Type99 { get; set; } /// /// /// - public global::AI21.Segment? Type100 { get; set; } + public global::AI21.SummarizationResponse? Type100 { get; set; } /// /// /// - public global::AI21.SegmentSummary? Type101 { get; set; } + public global::AI21.SummarizeBody? Type101 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type102 { get; set; } + public global::AI21.SummaryMethod? Type102 { get; set; } /// /// /// - public global::AI21.SegmentationBody? Type103 { get; set; } + public global::AI21.SummarizeBySegmentResponse? Type103 { get; set; } /// /// /// - public global::AI21.SegmentationResponse? Type104 { get; set; } + public global::System.Collections.Generic.IList? Type104 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type105 { get; set; } + public global::AI21.SystemMessage? Type105 { get; set; } /// /// /// - public global::AI21.SegmentedSummaryBody? Type106 { get; set; } + public global::AI21.SystemMessageRole? Type106 { get; set; } /// /// /// - public global::AI21.SummarizationResponse? Type107 { get; set; } + public global::AI21.ToolDefinition? Type107 { get; set; } /// /// /// - public global::AI21.SummarizeBody? Type108 { get; set; } + public global::AI21.ToolDefinitionType? Type108 { get; set; } /// /// /// - public global::AI21.SummaryMethod? Type109 { get; set; } + public global::AI21.ToolMessage? Type109 { get; set; } /// /// /// - public global::AI21.SummarizeBySegmentResponse? Type110 { get; set; } + public global::AI21.ToolMessageRole? Type110 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type111 { get; set; } + public global::AI21.UserMessage? Type111 { get; set; } /// /// /// - public global::AI21.SystemMessage? Type112 { get; set; } + public global::AI21.UserMessageRole? Type112 { get; set; } /// /// /// - public global::AI21.SystemMessageRole? Type113 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesChatChatRequest? Type113 { get; set; } /// /// /// - public global::AI21.ToolDefinition? Type114 { get; set; } + public global::System.Collections.Generic.IList? Type114 { get; set; } /// /// /// - public global::AI21.ToolDefinitionType? Type115 { get; set; } + public global::AI21.MessagesItem? Type115 { get; set; } /// /// /// - public global::AI21.ToolMessage? Type116 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator? Type116 { get; set; } /// /// /// - public global::AI21.ToolMessageRole? Type117 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? Type117 { get; set; } /// /// /// - public global::AI21.UserMessage? Type118 { get; set; } + public global::System.Collections.Generic.IList? Type118 { get; set; } /// /// /// - public global::AI21.UserMessageRole? Type119 { get; set; } + public global::AI21.AnyOf>? Type119 { get; set; } /// /// /// - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequest? Type120 { get; set; } + public global::System.Collections.Generic.IList? Type120 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type121 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesJ2ChatChatRequest? Type121 { get; set; } /// /// /// - public global::AI21.MessagesItem? Type122 { get; set; } + public global::System.Collections.Generic.IList? Type122 { get; set; } /// /// /// - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator? Type123 { get; set; } + public global::AI21.AnyOf>? Type123 { get; set; } /// /// /// - public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? Type124 { get; set; } + public global::System.Collections.Generic.IList? 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? Type125 { get; set; } } } \ No newline at end of file diff --git a/src/libs/AI21/openapi.yaml b/src/libs/AI21/openapi.yaml index c6bfac8..62a37a0 100644 --- a/src/libs/AI21/openapi.yaml +++ b/src/libs/AI21/openapi.yaml @@ -1185,38 +1185,6 @@ paths: 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' - '422': - description: Validation Error - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPValidationError' /studio/v1/library/search: post: tags: @@ -1419,13 +1387,6 @@ paths: $ref: '#/components/schemas/HTTPValidationError' components: schemas: - AnswerLength: - title: AnswerLength - enum: - - short - - medium - - long - description: An enumeration. AssistantMessage: title: AssistantMessage type: object @@ -2148,82 +2109,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: @@ -2393,12 +2278,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 +2459,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: