From 53ee488d8fad5082a5a456ca35be20385225b6b5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 Apr 2026 21:54:10 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...r.IToolsApiClient.CreateToolsAiDetect.g.cs | 42 -- ...piClient.CreateToolsComprehendMedical.g.cs | 43 -- ...ient.CreateToolsContextAwareSplitting.g.cs | 43 -- ...ToolsApiClient.CreateToolsTextToGraph.g.cs | 41 -- ...onConverters.AiDetectionResponseLabel.g.cs | 53 -- ...ters.AiDetectionResponseLabelNullable.g.cs | 60 --- ....JsonConverters.ComprehendMedicalType.g.cs | 53 -- ...verters.ComprehendMedicalTypeNullable.g.cs | 60 --- ...iter.JsonConverters.SplittingStrategy.g.cs | 53 -- ...nConverters.SplittingStrategyNullable.g.cs | 60 --- .../Writer.JsonSerializerContext.g.cs | 37 -- .../Writer.JsonSerializerContextTypes.g.cs | 200 ++----- ...Writer.Models.AiDetectionRequest.Json.g.cs | 92 ---- .../Writer.Models.AiDetectionRequest.g.cs | 49 -- ...riter.Models.AiDetectionResponse.Json.g.cs | 92 ---- .../Writer.Models.AiDetectionResponse.g.cs | 61 --- ...riter.Models.AiDetectionResponseLabel.g.cs | 51 -- ....Models.ComprehendMedicalRequest.Json.g.cs | 92 ---- ...riter.Models.ComprehendMedicalRequest.g.cs | 57 -- .../Writer.Models.ComprehendMedicalType.g.cs | 63 --- ...ls.ContextAwareSplittingResponse.Json.g.cs | 92 ---- ....Models.ContextAwareSplittingResponse.g.cs | 46 -- ...ContextAwareTextSplittingRequest.Json.g.cs | 92 ---- ...dels.ContextAwareTextSplittingRequest.g.cs | 57 -- ...odels.MedicalComprehendAttribute.Json.g.cs | 92 ---- ...ter.Models.MedicalComprehendAttribute.g.cs | 132 ----- ....Models.MedicalComprehendConcept.Json.g.cs | 92 ---- ...riter.Models.MedicalComprehendConcept.g.cs | 64 --- ...r.Models.MedicalComprehendEntity.Json.g.cs | 92 ---- ...Writer.Models.MedicalComprehendEntity.g.cs | 124 ----- ...Models.MedicalComprehendResponse.Json.g.cs | 92 ---- ...iter.Models.MedicalComprehendResponse.g.cs | 46 -- ...er.Models.MedicalComprehendTrait.Json.g.cs | 92 ---- .../Writer.Models.MedicalComprehendTrait.g.cs | 54 -- .../Writer.Models.SplittingStrategy.g.cs | 57 -- ...Writer.Models.TextToGraphRequest.Json.g.cs | 92 ---- .../Writer.Models.TextToGraphRequest.g.cs | 46 -- ...riter.Models.TextToGraphResponse.Json.g.cs | 92 ---- .../Writer.Models.TextToGraphResponse.g.cs | 46 -- ...er.ToolsApiClient.CreateToolsAiDetect.g.cs | 423 --------------- ...piClient.CreateToolsComprehendMedical.g.cs | 425 --------------- ...ient.CreateToolsContextAwareSplitting.g.cs | 425 --------------- ...ToolsApiClient.CreateToolsTextToGraph.g.cs | 422 --------------- .../Generated/autosdk.generated-examples.json | 15 +- src/libs/Writer/openapi.yaml | 497 ------------------ 45 files changed, 52 insertions(+), 4957 deletions(-) delete mode 100644 src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsAiDetect.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsComprehendMedical.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsContextAwareSplitting.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsTextToGraph.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.JsonConverters.AiDetectionResponseLabel.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.JsonConverters.AiDetectionResponseLabelNullable.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.JsonConverters.ComprehendMedicalType.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.JsonConverters.ComprehendMedicalTypeNullable.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.JsonConverters.SplittingStrategy.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.JsonConverters.SplittingStrategyNullable.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.AiDetectionRequest.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.AiDetectionRequest.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.AiDetectionResponse.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.AiDetectionResponse.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.AiDetectionResponseLabel.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.ComprehendMedicalRequest.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.ComprehendMedicalRequest.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.ComprehendMedicalType.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.ContextAwareSplittingResponse.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.ContextAwareSplittingResponse.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.ContextAwareTextSplittingRequest.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.ContextAwareTextSplittingRequest.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.MedicalComprehendAttribute.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.MedicalComprehendAttribute.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.MedicalComprehendConcept.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.MedicalComprehendConcept.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.MedicalComprehendEntity.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.MedicalComprehendEntity.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.MedicalComprehendResponse.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.MedicalComprehendResponse.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.MedicalComprehendTrait.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.MedicalComprehendTrait.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.SplittingStrategy.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.TextToGraphRequest.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.TextToGraphRequest.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.TextToGraphResponse.Json.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.Models.TextToGraphResponse.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsAiDetect.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsComprehendMedical.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsContextAwareSplitting.g.cs delete mode 100644 src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsTextToGraph.g.cs diff --git a/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsAiDetect.g.cs b/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsAiDetect.g.cs deleted file mode 100644 index a24dd6f..0000000 --- a/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsAiDetect.g.cs +++ /dev/null @@ -1,42 +0,0 @@ -#nullable enable - -namespace Writer -{ - public partial interface IToolsApiClient - { - /// - /// AI detection
- /// Detects if content is AI- or human-generated, with a confidence score. Content must have at least 350 characters - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --location --request POST https://api.writer.com/v1/tools/ai-detect \
- /// --header "Authorization: Bearer <token>" \
- /// --header "Content-Type: application/json" \
- /// --data-raw '{"input":"AI and ML continue to be at the forefront of technological advancements. In 2025, we can expect more sophisticated AI systems that can handle complex tasks with greater efficiency. AI will play a crucial role in various sectors, including healthcare, finance, and manufacturing. For instance, AI-powered diagnostic tools will become more accurate, helping doctors detect diseases at an early stage. In finance, AI algorithms will enhance fraud detection and risk management."}' - ///
- global::System.Threading.Tasks.Task CreateToolsAiDetectAsync( - - global::Writer.AiDetectionRequest request, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// AI detection
- /// Detects if content is AI- or human-generated, with a confidence score. Content must have at least 350 characters - ///
- /// - /// The content to determine if it is AI- or human-generated. Content must have at least 350 characters.
- /// Example: AI and ML continue to be at the forefront of technological advancements. In 2025, we can expect more sophisticated AI systems that can handle complex tasks with greater efficiency. AI will play a crucial role in various sectors, including healthcare, finance, and manufacturing. For instance, AI-powered diagnostic tools will become more accurate, helping doctors detect diseases at an early stage. In finance, AI algorithms will enhance fraud detection and risk management. - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateToolsAiDetectAsync( - string input, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsComprehendMedical.g.cs b/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsComprehendMedical.g.cs deleted file mode 100644 index a0878c3..0000000 --- a/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsComprehendMedical.g.cs +++ /dev/null @@ -1,43 +0,0 @@ -#nullable enable - -namespace Writer -{ - public partial interface IToolsApiClient - { - /// - /// Medical comprehend
- /// Analyze unstructured medical text to extract entities labeled with standardized medical codes and confidence scores. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --location --request POST https://api.writer.com/v1/tools/comprehend/medical \
- /// --header "Authorization: Bearer <token>" \
- /// --header "Content-Type: application/json" \
- /// --data-raw '{"content":"the symptoms are soreness, a temperature and cough","response_type":"Entities"}' - ///
- global::System.Threading.Tasks.Task CreateToolsComprehendMedicalAsync( - - global::Writer.ComprehendMedicalRequest request, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Medical comprehend
- /// Analyze unstructured medical text to extract entities labeled with standardized medical codes and confidence scores. - ///
- /// - /// The text to analyze. - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateToolsComprehendMedicalAsync( - string content, - global::Writer.ComprehendMedicalType responseType, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsContextAwareSplitting.g.cs b/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsContextAwareSplitting.g.cs deleted file mode 100644 index 8b3a900..0000000 --- a/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsContextAwareSplitting.g.cs +++ /dev/null @@ -1,43 +0,0 @@ -#nullable enable - -namespace Writer -{ - public partial interface IToolsApiClient - { - /// - /// Context-aware text splitting
- /// Splits a long block of text (maximum 4000 words) into smaller chunks while preserving the semantic meaning of the text and context between the chunks. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --location --request POST https://api.writer.com/v1/tools/context-aware-splitting \
- /// --header "Authorization: Bearer <token>" \
- /// --header "Content-Type: application/json" \
- /// --data-raw '{"text":"text to split","strategy":"llm_split"}' - ///
- global::System.Threading.Tasks.Task CreateToolsContextAwareSplittingAsync( - - global::Writer.ContextAwareTextSplittingRequest request, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Context-aware text splitting
- /// Splits a long block of text (maximum 4000 words) into smaller chunks while preserving the semantic meaning of the text and context between the chunks. - ///
- /// - /// The text to split into chunks. - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateToolsContextAwareSplittingAsync( - string text, - global::Writer.SplittingStrategy strategy, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsTextToGraph.g.cs b/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsTextToGraph.g.cs deleted file mode 100644 index 6d7d2ee..0000000 --- a/src/libs/Writer/Generated/Writer.IToolsApiClient.CreateToolsTextToGraph.g.cs +++ /dev/null @@ -1,41 +0,0 @@ -#nullable enable - -namespace Writer -{ - public partial interface IToolsApiClient - { - /// - /// Text-to-graph
- /// Performs name entity recognition on the supplied text accepting a maximum of 35000 words. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --location --request POST https://api.writer.com/v1/tools/text-to-graph \
- /// --header "Authorization: Bearer <token>" \
- /// --header "Content-Type: application/json" \
- /// --data-raw '{"text":"A racecar has very powerful brakes that can decelerate from 200 km/h to 0 km/h in a few seconds"}' - ///
- global::System.Threading.Tasks.Task CreateToolsTextToGraphAsync( - - global::Writer.TextToGraphRequest request, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Text-to-graph
- /// Performs name entity recognition on the supplied text accepting a maximum of 35000 words. - ///
- /// - /// The text to convert into a graph structure. Maximum of 35,000 words. - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateToolsTextToGraphAsync( - string text, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.JsonConverters.AiDetectionResponseLabel.g.cs b/src/libs/Writer/Generated/Writer.JsonConverters.AiDetectionResponseLabel.g.cs deleted file mode 100644 index dd1e521..0000000 --- a/src/libs/Writer/Generated/Writer.JsonConverters.AiDetectionResponseLabel.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Writer.JsonConverters -{ - /// - public sealed class AiDetectionResponseLabelJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Writer.AiDetectionResponseLabel 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::Writer.AiDetectionResponseLabelExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Writer.AiDetectionResponseLabel)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Writer.AiDetectionResponseLabel); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Writer.AiDetectionResponseLabel value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Writer.AiDetectionResponseLabelExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Writer/Generated/Writer.JsonConverters.AiDetectionResponseLabelNullable.g.cs b/src/libs/Writer/Generated/Writer.JsonConverters.AiDetectionResponseLabelNullable.g.cs deleted file mode 100644 index 4772c1e..0000000 --- a/src/libs/Writer/Generated/Writer.JsonConverters.AiDetectionResponseLabelNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Writer.JsonConverters -{ - /// - public sealed class AiDetectionResponseLabelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Writer.AiDetectionResponseLabel? 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::Writer.AiDetectionResponseLabelExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Writer.AiDetectionResponseLabel)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Writer.AiDetectionResponseLabel?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Writer.AiDetectionResponseLabel? 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::Writer.AiDetectionResponseLabelExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Writer/Generated/Writer.JsonConverters.ComprehendMedicalType.g.cs b/src/libs/Writer/Generated/Writer.JsonConverters.ComprehendMedicalType.g.cs deleted file mode 100644 index f4c502d..0000000 --- a/src/libs/Writer/Generated/Writer.JsonConverters.ComprehendMedicalType.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Writer.JsonConverters -{ - /// - public sealed class ComprehendMedicalTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Writer.ComprehendMedicalType 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::Writer.ComprehendMedicalTypeExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Writer.ComprehendMedicalType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Writer.ComprehendMedicalType); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Writer.ComprehendMedicalType value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Writer.ComprehendMedicalTypeExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Writer/Generated/Writer.JsonConverters.ComprehendMedicalTypeNullable.g.cs b/src/libs/Writer/Generated/Writer.JsonConverters.ComprehendMedicalTypeNullable.g.cs deleted file mode 100644 index a209314..0000000 --- a/src/libs/Writer/Generated/Writer.JsonConverters.ComprehendMedicalTypeNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Writer.JsonConverters -{ - /// - public sealed class ComprehendMedicalTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Writer.ComprehendMedicalType? 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::Writer.ComprehendMedicalTypeExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Writer.ComprehendMedicalType)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Writer.ComprehendMedicalType?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Writer.ComprehendMedicalType? 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::Writer.ComprehendMedicalTypeExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Writer/Generated/Writer.JsonConverters.SplittingStrategy.g.cs b/src/libs/Writer/Generated/Writer.JsonConverters.SplittingStrategy.g.cs deleted file mode 100644 index a326537..0000000 --- a/src/libs/Writer/Generated/Writer.JsonConverters.SplittingStrategy.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Writer.JsonConverters -{ - /// - public sealed class SplittingStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Writer.SplittingStrategy 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::Writer.SplittingStrategyExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Writer.SplittingStrategy)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Writer.SplittingStrategy); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Writer.SplittingStrategy value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Writer.SplittingStrategyExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Writer/Generated/Writer.JsonConverters.SplittingStrategyNullable.g.cs b/src/libs/Writer/Generated/Writer.JsonConverters.SplittingStrategyNullable.g.cs deleted file mode 100644 index 848ad68..0000000 --- a/src/libs/Writer/Generated/Writer.JsonConverters.SplittingStrategyNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Writer.JsonConverters -{ - /// - public sealed class SplittingStrategyNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Writer.SplittingStrategy? 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::Writer.SplittingStrategyExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Writer.SplittingStrategy)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Writer.SplittingStrategy?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Writer.SplittingStrategy? 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::Writer.SplittingStrategyExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Writer/Generated/Writer.JsonSerializerContext.g.cs b/src/libs/Writer/Generated/Writer.JsonSerializerContext.g.cs index ac07e07..ad360ca 100644 --- a/src/libs/Writer/Generated/Writer.JsonSerializerContext.g.cs +++ b/src/libs/Writer/Generated/Writer.JsonSerializerContext.g.cs @@ -117,18 +117,6 @@ namespace Writer typeof(global::Writer.JsonConverters.StringToolChoiceOptionsNullableJsonConverter), - typeof(global::Writer.JsonConverters.AiDetectionResponseLabelJsonConverter), - - typeof(global::Writer.JsonConverters.AiDetectionResponseLabelNullableJsonConverter), - - typeof(global::Writer.JsonConverters.ComprehendMedicalTypeJsonConverter), - - typeof(global::Writer.JsonConverters.ComprehendMedicalTypeNullableJsonConverter), - - typeof(global::Writer.JsonConverters.SplittingStrategyJsonConverter), - - typeof(global::Writer.JsonConverters.SplittingStrategyNullableJsonConverter), - typeof(global::Writer.JsonConverters.PdfConversionFormatJsonConverter), typeof(global::Writer.JsonConverters.PdfConversionFormatNullableJsonConverter), @@ -377,29 +365,9 @@ namespace Writer [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.StringToolChoice))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.JsonObjectToolChoice))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.StringToolChoiceOptions), TypeInfoPropertyName = "StringToolChoiceOptions2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.AiDetectionRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.AiDetectionResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.AiDetectionResponseLabel), TypeInfoPropertyName = "AiDetectionResponseLabel2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.ComprehendMedicalRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.ComprehendMedicalType), TypeInfoPropertyName = "ComprehendMedicalType2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.MedicalComprehendResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.MedicalComprehendEntity))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.MedicalComprehendTrait))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.MedicalComprehendConcept))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.MedicalComprehendAttribute))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.ContextAwareTextSplittingRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.SplittingStrategy), TypeInfoPropertyName = "SplittingStrategy2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.ContextAwareSplittingResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.ParsePdfRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.PdfConversionFormat), TypeInfoPropertyName = "PdfConversionFormat2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.ParsePdfResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.TextToGraphRequest))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.TextToGraphResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList>))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.VisionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Writer.VisionRequestModel), TypeInfoPropertyName = "VisionRequestModel2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] @@ -471,11 +439,6 @@ namespace Writer [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] diff --git a/src/libs/Writer/Generated/Writer.JsonSerializerContextTypes.g.cs b/src/libs/Writer/Generated/Writer.JsonSerializerContextTypes.g.cs index 7ee4154..8c4d9a7 100644 --- a/src/libs/Writer/Generated/Writer.JsonSerializerContextTypes.g.cs +++ b/src/libs/Writer/Generated/Writer.JsonSerializerContextTypes.g.cs @@ -672,255 +672,175 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Writer.AiDetectionRequest? Type161 { get; set; } + public global::Writer.ParsePdfRequest? Type161 { get; set; } /// /// /// - public global::Writer.AiDetectionResponse? Type162 { get; set; } + public global::Writer.PdfConversionFormat? Type162 { get; set; } /// /// /// - public global::Writer.AiDetectionResponseLabel? Type163 { get; set; } + public global::Writer.ParsePdfResponse? Type163 { get; set; } /// /// /// - public global::Writer.ComprehendMedicalRequest? Type164 { get; set; } + public global::Writer.VisionRequest? Type164 { get; set; } /// /// /// - public global::Writer.ComprehendMedicalType? Type165 { get; set; } + public global::Writer.VisionRequestModel? Type165 { get; set; } /// /// /// - public global::Writer.MedicalComprehendResponse? Type166 { get; set; } + public global::System.Collections.Generic.IList? Type166 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type167 { get; set; } + public global::Writer.VisionRequestFileVariable? Type167 { get; set; } /// /// /// - public global::Writer.MedicalComprehendEntity? Type168 { get; set; } + public global::Writer.VisionResponse? Type168 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type169 { get; set; } + public global::Writer.TranslationRequest? Type169 { get; set; } /// /// /// - public global::Writer.MedicalComprehendTrait? Type170 { get; set; } + public global::Writer.TranslationRequestModel? Type170 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type171 { get; set; } + public global::Writer.TranslationResponse? Type171 { get; set; } /// /// /// - public global::Writer.MedicalComprehendConcept? Type172 { get; set; } + public global::Writer.TranslationToolType? Type172 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type173 { get; set; } + public global::Writer.TranslationFunction? Type173 { get; set; } /// /// /// - public global::Writer.MedicalComprehendAttribute? Type174 { get; set; } + public global::Writer.TranslationFunctionModel? Type174 { get; set; } /// /// /// - public global::Writer.ContextAwareTextSplittingRequest? Type175 { get; set; } + public global::Writer.WebSearchRequest? Type175 { get; set; } /// /// /// - public global::Writer.SplittingStrategy? Type176 { get; set; } + public global::Writer.WebSearchRequestTopic? Type176 { get; set; } /// /// /// - public global::Writer.ContextAwareSplittingResponse? Type177 { get; set; } + public global::Writer.WebSearchRequestSearchDepth? Type177 { get; set; } /// /// /// - public global::Writer.ParsePdfRequest? Type178 { get; set; } + public global::Writer.WebSearchRequestTimeRange? Type178 { get; set; } /// /// /// - public global::Writer.PdfConversionFormat? Type179 { get; set; } + public global::Writer.OneOf? Type179 { get; set; } /// /// /// - public global::Writer.ParsePdfResponse? Type180 { get; set; } + public global::Writer.WebSearchRequestIncludeRawContent? Type180 { get; set; } /// /// /// - public global::Writer.TextToGraphRequest? Type181 { get; set; } + public global::Writer.WebSearchRequestCountry? Type181 { get; set; } /// /// /// - public global::Writer.TextToGraphResponse? Type182 { get; set; } + public global::Writer.WebSearchResponse? Type182 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type183 { get; set; } + public global::System.Collections.Generic.IList? Type183 { get; set; } /// /// /// - public global::Writer.VisionRequest? Type184 { get; set; } + public global::Writer.WebSearchResponseSource? Type184 { get; set; } /// /// /// - public global::Writer.VisionRequestModel? Type185 { get; set; } + public global::Writer.WebSearchToolType? Type185 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type186 { get; set; } + public global::Writer.WebSearchFunction? Type186 { get; set; } /// /// /// - public global::Writer.VisionRequestFileVariable? Type187 { get; set; } + public global::Writer.TextFragment? Type187 { get; set; } /// /// /// - public global::Writer.VisionResponse? Type188 { get; set; } + public global::Writer.ImageFragment? Type188 { get; set; } /// /// /// - public global::Writer.TranslationRequest? Type189 { get; set; } + public global::Writer.TextFragmentType? Type189 { get; set; } /// /// /// - public global::Writer.TranslationRequestModel? Type190 { get; set; } + public global::Writer.ImageFragmentType? Type190 { get; set; } /// /// /// - public global::Writer.TranslationResponse? Type191 { get; set; } + public global::Writer.ImageFragmentImageUrl? Type191 { get; set; } /// /// /// - public global::Writer.TranslationToolType? Type192 { get; set; } + public global::System.Collections.Generic.IList? Type192 { get; set; } /// /// /// - public global::Writer.TranslationFunction? Type193 { get; set; } + public global::Writer.File? Type193 { get; set; } /// /// /// - public global::Writer.TranslationFunctionModel? Type194 { get; set; } + public global::System.Collections.Generic.IList? Type194 { get; set; } /// /// /// - public global::Writer.WebSearchRequest? Type195 { get; set; } + public global::Writer.Web? Type195 { get; set; } /// /// /// - public global::Writer.WebSearchRequestTopic? Type196 { get; set; } + public byte[]? Type196 { get; set; } /// /// /// - public global::Writer.WebSearchRequestSearchDepth? Type197 { get; set; } + public global::Writer.FindGraphsWithFileStatusOrder? Type197 { get; set; } /// /// /// - public global::Writer.WebSearchRequestTimeRange? Type198 { get; set; } + public global::Writer.GatewayGetFilesOrder? Type198 { get; set; } /// /// /// - public global::Writer.OneOf? Type199 { get; set; } + public global::Writer.GatewayGetFilesStatus? Type199 { get; set; } /// /// /// - public global::Writer.WebSearchRequestIncludeRawContent? Type200 { get; set; } + public global::Writer.GetApplicationsOrder? Type200 { get; set; } /// /// /// - public global::Writer.WebSearchRequestCountry? Type201 { get; set; } + public global::System.Collections.Generic.IList? Type201 { get; set; } /// /// /// - public global::Writer.WebSearchResponse? Type202 { get; set; } + public global::System.Collections.Generic.IList? Type202 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type203 { get; set; } - /// - /// - /// - public global::Writer.WebSearchResponseSource? Type204 { get; set; } - /// - /// - /// - public global::Writer.WebSearchToolType? Type205 { get; set; } - /// - /// - /// - public global::Writer.WebSearchFunction? Type206 { get; set; } - /// - /// - /// - public global::Writer.TextFragment? Type207 { get; set; } - /// - /// - /// - public global::Writer.ImageFragment? Type208 { get; set; } - /// - /// - /// - public global::Writer.TextFragmentType? Type209 { get; set; } - /// - /// - /// - public global::Writer.ImageFragmentType? Type210 { get; set; } - /// - /// - /// - public global::Writer.ImageFragmentImageUrl? Type211 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type212 { get; set; } - /// - /// - /// - public global::Writer.File? Type213 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type214 { get; set; } - /// - /// - /// - public global::Writer.Web? Type215 { get; set; } - /// - /// - /// - public byte[]? Type216 { get; set; } - /// - /// - /// - public global::Writer.FindGraphsWithFileStatusOrder? Type217 { get; set; } - /// - /// - /// - public global::Writer.GatewayGetFilesOrder? Type218 { get; set; } - /// - /// - /// - public global::Writer.GatewayGetFilesStatus? Type219 { get; set; } - /// - /// - /// - public global::Writer.GetApplicationsOrder? Type220 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type221 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type222 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type223 { get; set; } + public global::System.Collections.Generic.IList? Type203 { get; set; } /// /// @@ -1049,50 +969,30 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType31 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType32 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType33 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType34 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List>? ListType35 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.List? ListType36 { get; set; } + public global::System.Collections.Generic.List? ListType31 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType37 { get; set; } + public global::System.Collections.Generic.List? ListType32 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType38 { get; set; } + public global::System.Collections.Generic.List? ListType33 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType39 { get; set; } + public global::System.Collections.Generic.List? ListType34 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType40 { get; set; } + public global::System.Collections.Generic.List? ListType35 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType41 { get; set; } + public global::System.Collections.Generic.List? ListType36 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType42 { get; set; } + public global::System.Collections.Generic.List? ListType37 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.AiDetectionRequest.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.AiDetectionRequest.Json.g.cs deleted file mode 100644 index 76c3d8b..0000000 --- a/src/libs/Writer/Generated/Writer.Models.AiDetectionRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class AiDetectionRequest - { - /// - /// 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::Writer.AiDetectionRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.AiDetectionRequest), - jsonSerializerContext) as global::Writer.AiDetectionRequest; - } - - /// - /// 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::Writer.AiDetectionRequest? 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::Writer.AiDetectionRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.AiDetectionRequest; - } - - /// - /// 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/Writer/Generated/Writer.Models.AiDetectionRequest.g.cs b/src/libs/Writer/Generated/Writer.Models.AiDetectionRequest.g.cs deleted file mode 100644 index ce95e7b..0000000 --- a/src/libs/Writer/Generated/Writer.Models.AiDetectionRequest.g.cs +++ /dev/null @@ -1,49 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class AiDetectionRequest - { - /// - /// The content to determine if it is AI- or human-generated. Content must have at least 350 characters.
- /// Example: AI and ML continue to be at the forefront of technological advancements. In 2025, we can expect more sophisticated AI systems that can handle complex tasks with greater efficiency. AI will play a crucial role in various sectors, including healthcare, finance, and manufacturing. For instance, AI-powered diagnostic tools will become more accurate, helping doctors detect diseases at an early stage. In finance, AI algorithms will enhance fraud detection and risk management. - ///
- /// AI and ML continue to be at the forefront of technological advancements. In 2025, we can expect more sophisticated AI systems that can handle complex tasks with greater efficiency. AI will play a crucial role in various sectors, including healthcare, finance, and manufacturing. For instance, AI-powered diagnostic tools will become more accurate, helping doctors detect diseases at an early stage. In finance, AI algorithms will enhance fraud detection and risk management. - [global::System.Text.Json.Serialization.JsonPropertyName("input")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Input { 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. - /// - /// - /// The content to determine if it is AI- or human-generated. Content must have at least 350 characters.
- /// Example: AI and ML continue to be at the forefront of technological advancements. In 2025, we can expect more sophisticated AI systems that can handle complex tasks with greater efficiency. AI will play a crucial role in various sectors, including healthcare, finance, and manufacturing. For instance, AI-powered diagnostic tools will become more accurate, helping doctors detect diseases at an early stage. In finance, AI algorithms will enhance fraud detection and risk management. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public AiDetectionRequest( - string input) - { - this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); - } - - /// - /// Initializes a new instance of the class. - /// - public AiDetectionRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.AiDetectionResponse.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.AiDetectionResponse.Json.g.cs deleted file mode 100644 index b7f99d3..0000000 --- a/src/libs/Writer/Generated/Writer.Models.AiDetectionResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class AiDetectionResponse - { - /// - /// 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::Writer.AiDetectionResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.AiDetectionResponse), - jsonSerializerContext) as global::Writer.AiDetectionResponse; - } - - /// - /// 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::Writer.AiDetectionResponse? 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::Writer.AiDetectionResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.AiDetectionResponse; - } - - /// - /// 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/Writer/Generated/Writer.Models.AiDetectionResponse.g.cs b/src/libs/Writer/Generated/Writer.Models.AiDetectionResponse.g.cs deleted file mode 100644 index 71350df..0000000 --- a/src/libs/Writer/Generated/Writer.Models.AiDetectionResponse.g.cs +++ /dev/null @@ -1,61 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class AiDetectionResponse - { - /// - /// Example: fake - /// - /// fake - [global::System.Text.Json.Serialization.JsonPropertyName("label")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Writer.JsonConverters.AiDetectionResponseLabelJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Writer.AiDetectionResponseLabel Label { get; set; } - - /// - /// Example: 0.6265060305595398 - /// - /// 0.6265060305595398 - [global::System.Text.Json.Serialization.JsonPropertyName("score")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double Score { 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. - /// - /// - /// Example: fake - /// - /// - /// Example: 0.6265060305595398 - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public AiDetectionResponse( - global::Writer.AiDetectionResponseLabel label, - double score) - { - this.Label = label; - this.Score = score; - } - - /// - /// Initializes a new instance of the class. - /// - public AiDetectionResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.AiDetectionResponseLabel.g.cs b/src/libs/Writer/Generated/Writer.Models.AiDetectionResponseLabel.g.cs deleted file mode 100644 index 7a69273..0000000 --- a/src/libs/Writer/Generated/Writer.Models.AiDetectionResponseLabel.g.cs +++ /dev/null @@ -1,51 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// Example: fake - /// - public enum AiDetectionResponseLabel - { - /// - /// - /// - Fake, - /// - /// - /// - Real, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class AiDetectionResponseLabelExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this AiDetectionResponseLabel value) - { - return value switch - { - AiDetectionResponseLabel.Fake => "fake", - AiDetectionResponseLabel.Real => "real", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static AiDetectionResponseLabel? ToEnum(string value) - { - return value switch - { - "fake" => AiDetectionResponseLabel.Fake, - "real" => AiDetectionResponseLabel.Real, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.ComprehendMedicalRequest.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.ComprehendMedicalRequest.Json.g.cs deleted file mode 100644 index 2687e03..0000000 --- a/src/libs/Writer/Generated/Writer.Models.ComprehendMedicalRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class ComprehendMedicalRequest - { - /// - /// 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::Writer.ComprehendMedicalRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.ComprehendMedicalRequest), - jsonSerializerContext) as global::Writer.ComprehendMedicalRequest; - } - - /// - /// 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::Writer.ComprehendMedicalRequest? 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::Writer.ComprehendMedicalRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.ComprehendMedicalRequest; - } - - /// - /// 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/Writer/Generated/Writer.Models.ComprehendMedicalRequest.g.cs b/src/libs/Writer/Generated/Writer.Models.ComprehendMedicalRequest.g.cs deleted file mode 100644 index b27154b..0000000 --- a/src/libs/Writer/Generated/Writer.Models.ComprehendMedicalRequest.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class ComprehendMedicalRequest - { - /// - /// The text to analyze. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("content")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Content { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("response_type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Writer.JsonConverters.ComprehendMedicalTypeJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Writer.ComprehendMedicalType ResponseType { 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. - /// - /// - /// The text to analyze. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ComprehendMedicalRequest( - string content, - global::Writer.ComprehendMedicalType responseType) - { - this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); - this.ResponseType = responseType; - } - - /// - /// Initializes a new instance of the class. - /// - public ComprehendMedicalRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.ComprehendMedicalType.g.cs b/src/libs/Writer/Generated/Writer.Models.ComprehendMedicalType.g.cs deleted file mode 100644 index 3955e36..0000000 --- a/src/libs/Writer/Generated/Writer.Models.ComprehendMedicalType.g.cs +++ /dev/null @@ -1,63 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public enum ComprehendMedicalType - { - /// - /// - /// - Entities, - /// - /// - /// - Icd10Cm, - /// - /// - /// - RxNorm, - /// - /// - /// - SnomedCt, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ComprehendMedicalTypeExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ComprehendMedicalType value) - { - return value switch - { - ComprehendMedicalType.Entities => "Entities", - ComprehendMedicalType.Icd10Cm => "ICD-10-CM", - ComprehendMedicalType.RxNorm => "RxNorm", - ComprehendMedicalType.SnomedCt => "SNOMED CT", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ComprehendMedicalType? ToEnum(string value) - { - return value switch - { - "Entities" => ComprehendMedicalType.Entities, - "ICD-10-CM" => ComprehendMedicalType.Icd10Cm, - "RxNorm" => ComprehendMedicalType.RxNorm, - "SNOMED CT" => ComprehendMedicalType.SnomedCt, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.ContextAwareSplittingResponse.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.ContextAwareSplittingResponse.Json.g.cs deleted file mode 100644 index 8fb290a..0000000 --- a/src/libs/Writer/Generated/Writer.Models.ContextAwareSplittingResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class ContextAwareSplittingResponse - { - /// - /// 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::Writer.ContextAwareSplittingResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.ContextAwareSplittingResponse), - jsonSerializerContext) as global::Writer.ContextAwareSplittingResponse; - } - - /// - /// 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::Writer.ContextAwareSplittingResponse? 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::Writer.ContextAwareSplittingResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.ContextAwareSplittingResponse; - } - - /// - /// 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/Writer/Generated/Writer.Models.ContextAwareSplittingResponse.g.cs b/src/libs/Writer/Generated/Writer.Models.ContextAwareSplittingResponse.g.cs deleted file mode 100644 index 70375b4..0000000 --- a/src/libs/Writer/Generated/Writer.Models.ContextAwareSplittingResponse.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class ContextAwareSplittingResponse - { - /// - /// An array of text chunks generated by splitting the input text based on the specified strategy. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("chunks")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Chunks { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// An array of text chunks generated by splitting the input text based on the specified strategy. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ContextAwareSplittingResponse( - global::System.Collections.Generic.IList chunks) - { - this.Chunks = chunks ?? throw new global::System.ArgumentNullException(nameof(chunks)); - } - - /// - /// Initializes a new instance of the class. - /// - public ContextAwareSplittingResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.ContextAwareTextSplittingRequest.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.ContextAwareTextSplittingRequest.Json.g.cs deleted file mode 100644 index f34fff4..0000000 --- a/src/libs/Writer/Generated/Writer.Models.ContextAwareTextSplittingRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class ContextAwareTextSplittingRequest - { - /// - /// 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::Writer.ContextAwareTextSplittingRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.ContextAwareTextSplittingRequest), - jsonSerializerContext) as global::Writer.ContextAwareTextSplittingRequest; - } - - /// - /// 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::Writer.ContextAwareTextSplittingRequest? 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::Writer.ContextAwareTextSplittingRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.ContextAwareTextSplittingRequest; - } - - /// - /// 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/Writer/Generated/Writer.Models.ContextAwareTextSplittingRequest.g.cs b/src/libs/Writer/Generated/Writer.Models.ContextAwareTextSplittingRequest.g.cs deleted file mode 100644 index 5f5453f..0000000 --- a/src/libs/Writer/Generated/Writer.Models.ContextAwareTextSplittingRequest.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class ContextAwareTextSplittingRequest - { - /// - /// The text to split into chunks. - /// - [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("strategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Writer.JsonConverters.SplittingStrategyJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Writer.SplittingStrategy Strategy { 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. - /// - /// - /// The text to split into chunks. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public ContextAwareTextSplittingRequest( - string text, - global::Writer.SplittingStrategy strategy) - { - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.Strategy = strategy; - } - - /// - /// Initializes a new instance of the class. - /// - public ContextAwareTextSplittingRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendAttribute.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.MedicalComprehendAttribute.Json.g.cs deleted file mode 100644 index f47ad82..0000000 --- a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendAttribute.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class MedicalComprehendAttribute - { - /// - /// 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::Writer.MedicalComprehendAttribute? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.MedicalComprehendAttribute), - jsonSerializerContext) as global::Writer.MedicalComprehendAttribute; - } - - /// - /// 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::Writer.MedicalComprehendAttribute? 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::Writer.MedicalComprehendAttribute), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.MedicalComprehendAttribute; - } - - /// - /// 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/Writer/Generated/Writer.Models.MedicalComprehendAttribute.g.cs b/src/libs/Writer/Generated/Writer.Models.MedicalComprehendAttribute.g.cs deleted file mode 100644 index 5d1bc17..0000000 --- a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendAttribute.g.cs +++ /dev/null @@ -1,132 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class MedicalComprehendAttribute - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("category")] - public string? Category { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("relationship_score")] - [global::System.Text.Json.Serialization.JsonRequired] - public required double RelationshipScore { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("begin_offset")] - [global::System.Text.Json.Serialization.JsonRequired] - public required long BeginOffset { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("end_offset")] - [global::System.Text.Json.Serialization.JsonRequired] - public required long EndOffset { get; set; } - - /// - /// - /// - [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("traits")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Traits { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("concepts")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Concepts { 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("relationship_type")] - public string? RelationshipType { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { 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. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public MedicalComprehendAttribute( - double relationshipScore, - long beginOffset, - long endOffset, - string text, - global::System.Collections.Generic.IList traits, - global::System.Collections.Generic.IList concepts, - double score, - string type, - string? category, - string? relationshipType) - { - this.Category = category; - this.RelationshipScore = relationshipScore; - this.BeginOffset = beginOffset; - this.EndOffset = endOffset; - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.Traits = traits ?? throw new global::System.ArgumentNullException(nameof(traits)); - this.Concepts = concepts ?? throw new global::System.ArgumentNullException(nameof(concepts)); - this.Score = score; - this.RelationshipType = relationshipType; - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - } - - /// - /// Initializes a new instance of the class. - /// - public MedicalComprehendAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendConcept.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.MedicalComprehendConcept.Json.g.cs deleted file mode 100644 index 14018ee..0000000 --- a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendConcept.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class MedicalComprehendConcept - { - /// - /// 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::Writer.MedicalComprehendConcept? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.MedicalComprehendConcept), - jsonSerializerContext) as global::Writer.MedicalComprehendConcept; - } - - /// - /// 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::Writer.MedicalComprehendConcept? 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::Writer.MedicalComprehendConcept), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.MedicalComprehendConcept; - } - - /// - /// 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/Writer/Generated/Writer.Models.MedicalComprehendConcept.g.cs b/src/libs/Writer/Generated/Writer.Models.MedicalComprehendConcept.g.cs deleted file mode 100644 index de8cfa3..0000000 --- a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendConcept.g.cs +++ /dev/null @@ -1,64 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class MedicalComprehendConcept - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("code")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Code { 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("description")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Description { 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. - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public MedicalComprehendConcept( - string code, - double score, - string description) - { - this.Code = code ?? throw new global::System.ArgumentNullException(nameof(code)); - this.Score = score; - this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); - } - - /// - /// Initializes a new instance of the class. - /// - public MedicalComprehendConcept() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendEntity.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.MedicalComprehendEntity.Json.g.cs deleted file mode 100644 index ffaaa72..0000000 --- a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendEntity.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class MedicalComprehendEntity - { - /// - /// 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::Writer.MedicalComprehendEntity? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.MedicalComprehendEntity), - jsonSerializerContext) as global::Writer.MedicalComprehendEntity; - } - - /// - /// 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::Writer.MedicalComprehendEntity? 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::Writer.MedicalComprehendEntity), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.MedicalComprehendEntity; - } - - /// - /// 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/Writer/Generated/Writer.Models.MedicalComprehendEntity.g.cs b/src/libs/Writer/Generated/Writer.Models.MedicalComprehendEntity.g.cs deleted file mode 100644 index 15ace3f..0000000 --- a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendEntity.g.cs +++ /dev/null @@ -1,124 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class MedicalComprehendEntity - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("category")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Category { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("begin_offset")] - [global::System.Text.Json.Serialization.JsonRequired] - public required long BeginOffset { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("end_offset")] - [global::System.Text.Json.Serialization.JsonRequired] - public required long EndOffset { get; set; } - - /// - /// - /// - [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("traits")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Traits { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("concepts")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Concepts { 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("attributes")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Attributes { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { 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. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public MedicalComprehendEntity( - string category, - long beginOffset, - long endOffset, - string text, - global::System.Collections.Generic.IList traits, - global::System.Collections.Generic.IList concepts, - double score, - global::System.Collections.Generic.IList attributes, - string type) - { - this.Category = category ?? throw new global::System.ArgumentNullException(nameof(category)); - this.BeginOffset = beginOffset; - this.EndOffset = endOffset; - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - this.Traits = traits ?? throw new global::System.ArgumentNullException(nameof(traits)); - this.Concepts = concepts ?? throw new global::System.ArgumentNullException(nameof(concepts)); - this.Score = score; - this.Attributes = attributes ?? throw new global::System.ArgumentNullException(nameof(attributes)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - } - - /// - /// Initializes a new instance of the class. - /// - public MedicalComprehendEntity() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendResponse.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.MedicalComprehendResponse.Json.g.cs deleted file mode 100644 index 90299d8..0000000 --- a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class MedicalComprehendResponse - { - /// - /// 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::Writer.MedicalComprehendResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.MedicalComprehendResponse), - jsonSerializerContext) as global::Writer.MedicalComprehendResponse; - } - - /// - /// 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::Writer.MedicalComprehendResponse? 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::Writer.MedicalComprehendResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.MedicalComprehendResponse; - } - - /// - /// 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/Writer/Generated/Writer.Models.MedicalComprehendResponse.g.cs b/src/libs/Writer/Generated/Writer.Models.MedicalComprehendResponse.g.cs deleted file mode 100644 index 4761d9d..0000000 --- a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendResponse.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class MedicalComprehendResponse - { - /// - /// An array of medical entities extracted from the input text. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("entities")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Entities { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// An array of medical entities extracted from the input text. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public MedicalComprehendResponse( - global::System.Collections.Generic.IList entities) - { - this.Entities = entities ?? throw new global::System.ArgumentNullException(nameof(entities)); - } - - /// - /// Initializes a new instance of the class. - /// - public MedicalComprehendResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendTrait.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.MedicalComprehendTrait.Json.g.cs deleted file mode 100644 index 13709c0..0000000 --- a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendTrait.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class MedicalComprehendTrait - { - /// - /// 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::Writer.MedicalComprehendTrait? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.MedicalComprehendTrait), - jsonSerializerContext) as global::Writer.MedicalComprehendTrait; - } - - /// - /// 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::Writer.MedicalComprehendTrait? 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::Writer.MedicalComprehendTrait), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.MedicalComprehendTrait; - } - - /// - /// 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/Writer/Generated/Writer.Models.MedicalComprehendTrait.g.cs b/src/libs/Writer/Generated/Writer.Models.MedicalComprehendTrait.g.cs deleted file mode 100644 index b6664d7..0000000 --- a/src/libs/Writer/Generated/Writer.Models.MedicalComprehendTrait.g.cs +++ /dev/null @@ -1,54 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class MedicalComprehendTrait - { - /// - /// - /// - [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("name")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Name { 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. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public MedicalComprehendTrait( - double score, - string name) - { - this.Score = score; - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - } - - /// - /// Initializes a new instance of the class. - /// - public MedicalComprehendTrait() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.SplittingStrategy.g.cs b/src/libs/Writer/Generated/Writer.Models.SplittingStrategy.g.cs deleted file mode 100644 index 164a7ef..0000000 --- a/src/libs/Writer/Generated/Writer.Models.SplittingStrategy.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public enum SplittingStrategy - { - /// - /// - /// - FastSplit, - /// - /// - /// - HybridSplit, - /// - /// - /// - LlmSplit, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class SplittingStrategyExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this SplittingStrategy value) - { - return value switch - { - SplittingStrategy.FastSplit => "fast_split", - SplittingStrategy.HybridSplit => "hybrid_split", - SplittingStrategy.LlmSplit => "llm_split", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static SplittingStrategy? ToEnum(string value) - { - return value switch - { - "fast_split" => SplittingStrategy.FastSplit, - "hybrid_split" => SplittingStrategy.HybridSplit, - "llm_split" => SplittingStrategy.LlmSplit, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.TextToGraphRequest.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.TextToGraphRequest.Json.g.cs deleted file mode 100644 index 6c838cc..0000000 --- a/src/libs/Writer/Generated/Writer.Models.TextToGraphRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class TextToGraphRequest - { - /// - /// 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::Writer.TextToGraphRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.TextToGraphRequest), - jsonSerializerContext) as global::Writer.TextToGraphRequest; - } - - /// - /// 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::Writer.TextToGraphRequest? 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::Writer.TextToGraphRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.TextToGraphRequest; - } - - /// - /// 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/Writer/Generated/Writer.Models.TextToGraphRequest.g.cs b/src/libs/Writer/Generated/Writer.Models.TextToGraphRequest.g.cs deleted file mode 100644 index 6ec3393..0000000 --- a/src/libs/Writer/Generated/Writer.Models.TextToGraphRequest.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class TextToGraphRequest - { - /// - /// The text to convert into a graph structure. Maximum of 35,000 words. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("text")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Text { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The text to convert into a graph structure. Maximum of 35,000 words. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TextToGraphRequest( - string text) - { - this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); - } - - /// - /// Initializes a new instance of the class. - /// - public TextToGraphRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.Models.TextToGraphResponse.Json.g.cs b/src/libs/Writer/Generated/Writer.Models.TextToGraphResponse.Json.g.cs deleted file mode 100644 index 38427fe..0000000 --- a/src/libs/Writer/Generated/Writer.Models.TextToGraphResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Writer -{ - public sealed partial class TextToGraphResponse - { - /// - /// 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::Writer.TextToGraphResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Writer.TextToGraphResponse), - jsonSerializerContext) as global::Writer.TextToGraphResponse; - } - - /// - /// 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::Writer.TextToGraphResponse? 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::Writer.TextToGraphResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Writer.TextToGraphResponse; - } - - /// - /// 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/Writer/Generated/Writer.Models.TextToGraphResponse.g.cs b/src/libs/Writer/Generated/Writer.Models.TextToGraphResponse.g.cs deleted file mode 100644 index 8a4b703..0000000 --- a/src/libs/Writer/Generated/Writer.Models.TextToGraphResponse.g.cs +++ /dev/null @@ -1,46 +0,0 @@ - -#nullable enable - -namespace Writer -{ - /// - /// - /// - public sealed partial class TextToGraphResponse - { - /// - /// The graph structure generated from the input text, represented by a string array of entities and relationships. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("graph")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList> Graph { 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. - /// - /// - /// The graph structure generated from the input text, represented by a string array of entities and relationships. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public TextToGraphResponse( - global::System.Collections.Generic.IList> graph) - { - this.Graph = graph ?? throw new global::System.ArgumentNullException(nameof(graph)); - } - - /// - /// Initializes a new instance of the class. - /// - public TextToGraphResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsAiDetect.g.cs b/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsAiDetect.g.cs deleted file mode 100644 index d40225a..0000000 --- a/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsAiDetect.g.cs +++ /dev/null @@ -1,423 +0,0 @@ - -#nullable enable - -namespace Writer -{ - public partial class ToolsApiClient - { - - - private static readonly global::Writer.EndPointSecurityRequirement s_CreateToolsAiDetectSecurityRequirement0 = - new global::Writer.EndPointSecurityRequirement - { - Authorizations = new global::Writer.EndPointAuthorizationRequirement[] - { new global::Writer.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "BearerAuth", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Writer.EndPointSecurityRequirement[] s_CreateToolsAiDetectSecurityRequirements = - new global::Writer.EndPointSecurityRequirement[] - { s_CreateToolsAiDetectSecurityRequirement0, - }; - partial void PrepareCreateToolsAiDetectArguments( - global::System.Net.Http.HttpClient httpClient, - global::Writer.AiDetectionRequest request); - partial void PrepareCreateToolsAiDetectRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Writer.AiDetectionRequest request); - partial void ProcessCreateToolsAiDetectResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateToolsAiDetectResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// AI detection
- /// Detects if content is AI- or human-generated, with a confidence score. Content must have at least 350 characters - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --location --request POST https://api.writer.com/v1/tools/ai-detect \
- /// --header "Authorization: Bearer <token>" \
- /// --header "Content-Type: application/json" \
- /// --data-raw '{"input":"AI and ML continue to be at the forefront of technological advancements. In 2025, we can expect more sophisticated AI systems that can handle complex tasks with greater efficiency. AI will play a crucial role in various sectors, including healthcare, finance, and manufacturing. For instance, AI-powered diagnostic tools will become more accurate, helping doctors detect diseases at an early stage. In finance, AI algorithms will enhance fraud detection and risk management."}' - ///
- public async global::System.Threading.Tasks.Task CreateToolsAiDetectAsync( - - global::Writer.AiDetectionRequest request, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateToolsAiDetectArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Writer.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateToolsAiDetectSecurityRequirements, - operationName: "CreateToolsAiDetectAsync"); - - using var __timeoutCancellationTokenSource = global::Writer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Writer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Writer.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Writer.PathBuilder( - path: "/v1/tools/ai-detect", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Writer.AutoSDKRequestOptionsSupport.AppendQueryParameters( - path: __path, - clientParameters: Options.QueryParameters, - requestParameters: requestOptions?.QueryParameters); - 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)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in __authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2" || - __authorization.Type == "OpenIdConnect") - { - __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; - global::Writer.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateToolsAiDetectRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - request: request); - - return __httpRequest; - } - - global::System.Net.Http.HttpRequestMessage? __httpRequest = null; - global::System.Net.Http.HttpResponseMessage? __response = null; - var __attemptNumber = 0; - try - { - for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) - { - __attemptNumber = __attempt; - __httpRequest = __CreateHttpRequest(); - await global::Writer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsAiDetect", - methodName: "CreateToolsAiDetectAsync", - pathTemplate: "\"/v1/tools/ai-detect\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: null, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - try - { - __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - } - catch (global::System.Net.Http.HttpRequestException __exception) - { - var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsAiDetect", - methodName: "CreateToolsAiDetectAsync", - pathTemplate: "\"/v1/tools/ai-detect\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: null, - exception: __exception, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: __willRetry, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - if (!__willRetry) - { - throw; - } - - __httpRequest.Dispose(); - __httpRequest = null; - await global::Writer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Writer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsAiDetect", - methodName: "CreateToolsAiDetectAsync", - pathTemplate: "\"/v1/tools/ai-detect\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: true, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - __response.Dispose(); - __response = null; - __httpRequest.Dispose(); - __httpRequest = null; - await global::Writer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - break; - } - - if (__response == null) - { - throw new global::System.InvalidOperationException("No response received."); - } - - using (__response) - { - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessCreateToolsAiDetectResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsAiDetect", - methodName: "CreateToolsAiDetectAsync", - pathTemplate: "\"/v1/tools/ai-detect\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attemptNumber, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - } - else - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsAiDetect", - methodName: "CreateToolsAiDetectAsync", - pathTemplate: "\"/v1/tools/ai-detect\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attemptNumber, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - } - - if (__effectiveReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessCreateToolsAiDetectResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Writer.AiDetectionResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Writer.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), - }; - } - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return - await global::Writer.AiDetectionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - catch (global::System.Exception __ex) - { - string? __content = null; - try - { - __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - } - catch (global::System.Exception) - { - } - - throw new global::Writer.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), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// AI detection
- /// Detects if content is AI- or human-generated, with a confidence score. Content must have at least 350 characters - ///
- /// - /// The content to determine if it is AI- or human-generated. Content must have at least 350 characters.
- /// Example: AI and ML continue to be at the forefront of technological advancements. In 2025, we can expect more sophisticated AI systems that can handle complex tasks with greater efficiency. AI will play a crucial role in various sectors, including healthcare, finance, and manufacturing. For instance, AI-powered diagnostic tools will become more accurate, helping doctors detect diseases at an early stage. In finance, AI algorithms will enhance fraud detection and risk management. - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateToolsAiDetectAsync( - string input, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Writer.AiDetectionRequest - { - Input = input, - }; - - return await CreateToolsAiDetectAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsComprehendMedical.g.cs b/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsComprehendMedical.g.cs deleted file mode 100644 index 640ed9b..0000000 --- a/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsComprehendMedical.g.cs +++ /dev/null @@ -1,425 +0,0 @@ - -#nullable enable - -namespace Writer -{ - public partial class ToolsApiClient - { - - - private static readonly global::Writer.EndPointSecurityRequirement s_CreateToolsComprehendMedicalSecurityRequirement0 = - new global::Writer.EndPointSecurityRequirement - { - Authorizations = new global::Writer.EndPointAuthorizationRequirement[] - { new global::Writer.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "BearerAuth", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Writer.EndPointSecurityRequirement[] s_CreateToolsComprehendMedicalSecurityRequirements = - new global::Writer.EndPointSecurityRequirement[] - { s_CreateToolsComprehendMedicalSecurityRequirement0, - }; - partial void PrepareCreateToolsComprehendMedicalArguments( - global::System.Net.Http.HttpClient httpClient, - global::Writer.ComprehendMedicalRequest request); - partial void PrepareCreateToolsComprehendMedicalRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Writer.ComprehendMedicalRequest request); - partial void ProcessCreateToolsComprehendMedicalResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateToolsComprehendMedicalResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Medical comprehend
- /// Analyze unstructured medical text to extract entities labeled with standardized medical codes and confidence scores. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --location --request POST https://api.writer.com/v1/tools/comprehend/medical \
- /// --header "Authorization: Bearer <token>" \
- /// --header "Content-Type: application/json" \
- /// --data-raw '{"content":"the symptoms are soreness, a temperature and cough","response_type":"Entities"}' - ///
- public async global::System.Threading.Tasks.Task CreateToolsComprehendMedicalAsync( - - global::Writer.ComprehendMedicalRequest request, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateToolsComprehendMedicalArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Writer.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateToolsComprehendMedicalSecurityRequirements, - operationName: "CreateToolsComprehendMedicalAsync"); - - using var __timeoutCancellationTokenSource = global::Writer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Writer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Writer.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Writer.PathBuilder( - path: "/v1/tools/comprehend/medical", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Writer.AutoSDKRequestOptionsSupport.AppendQueryParameters( - path: __path, - clientParameters: Options.QueryParameters, - requestParameters: requestOptions?.QueryParameters); - 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)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in __authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2" || - __authorization.Type == "OpenIdConnect") - { - __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; - global::Writer.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateToolsComprehendMedicalRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - request: request); - - return __httpRequest; - } - - global::System.Net.Http.HttpRequestMessage? __httpRequest = null; - global::System.Net.Http.HttpResponseMessage? __response = null; - var __attemptNumber = 0; - try - { - for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) - { - __attemptNumber = __attempt; - __httpRequest = __CreateHttpRequest(); - await global::Writer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsComprehendMedical", - methodName: "CreateToolsComprehendMedicalAsync", - pathTemplate: "\"/v1/tools/comprehend/medical\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: null, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - try - { - __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - } - catch (global::System.Net.Http.HttpRequestException __exception) - { - var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsComprehendMedical", - methodName: "CreateToolsComprehendMedicalAsync", - pathTemplate: "\"/v1/tools/comprehend/medical\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: null, - exception: __exception, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: __willRetry, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - if (!__willRetry) - { - throw; - } - - __httpRequest.Dispose(); - __httpRequest = null; - await global::Writer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Writer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsComprehendMedical", - methodName: "CreateToolsComprehendMedicalAsync", - pathTemplate: "\"/v1/tools/comprehend/medical\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: true, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - __response.Dispose(); - __response = null; - __httpRequest.Dispose(); - __httpRequest = null; - await global::Writer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - break; - } - - if (__response == null) - { - throw new global::System.InvalidOperationException("No response received."); - } - - using (__response) - { - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessCreateToolsComprehendMedicalResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsComprehendMedical", - methodName: "CreateToolsComprehendMedicalAsync", - pathTemplate: "\"/v1/tools/comprehend/medical\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attemptNumber, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - } - else - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsComprehendMedical", - methodName: "CreateToolsComprehendMedicalAsync", - pathTemplate: "\"/v1/tools/comprehend/medical\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attemptNumber, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - } - - if (__effectiveReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessCreateToolsComprehendMedicalResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Writer.MedicalComprehendResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Writer.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), - }; - } - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return - await global::Writer.MedicalComprehendResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - catch (global::System.Exception __ex) - { - string? __content = null; - try - { - __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - } - catch (global::System.Exception) - { - } - - throw new global::Writer.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), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Medical comprehend
- /// Analyze unstructured medical text to extract entities labeled with standardized medical codes and confidence scores. - ///
- /// - /// The text to analyze. - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateToolsComprehendMedicalAsync( - string content, - global::Writer.ComprehendMedicalType responseType, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Writer.ComprehendMedicalRequest - { - Content = content, - ResponseType = responseType, - }; - - return await CreateToolsComprehendMedicalAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsContextAwareSplitting.g.cs b/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsContextAwareSplitting.g.cs deleted file mode 100644 index 5ff6ea1..0000000 --- a/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsContextAwareSplitting.g.cs +++ /dev/null @@ -1,425 +0,0 @@ - -#nullable enable - -namespace Writer -{ - public partial class ToolsApiClient - { - - - private static readonly global::Writer.EndPointSecurityRequirement s_CreateToolsContextAwareSplittingSecurityRequirement0 = - new global::Writer.EndPointSecurityRequirement - { - Authorizations = new global::Writer.EndPointAuthorizationRequirement[] - { new global::Writer.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "BearerAuth", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Writer.EndPointSecurityRequirement[] s_CreateToolsContextAwareSplittingSecurityRequirements = - new global::Writer.EndPointSecurityRequirement[] - { s_CreateToolsContextAwareSplittingSecurityRequirement0, - }; - partial void PrepareCreateToolsContextAwareSplittingArguments( - global::System.Net.Http.HttpClient httpClient, - global::Writer.ContextAwareTextSplittingRequest request); - partial void PrepareCreateToolsContextAwareSplittingRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Writer.ContextAwareTextSplittingRequest request); - partial void ProcessCreateToolsContextAwareSplittingResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateToolsContextAwareSplittingResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Context-aware text splitting
- /// Splits a long block of text (maximum 4000 words) into smaller chunks while preserving the semantic meaning of the text and context between the chunks. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --location --request POST https://api.writer.com/v1/tools/context-aware-splitting \
- /// --header "Authorization: Bearer <token>" \
- /// --header "Content-Type: application/json" \
- /// --data-raw '{"text":"text to split","strategy":"llm_split"}' - ///
- public async global::System.Threading.Tasks.Task CreateToolsContextAwareSplittingAsync( - - global::Writer.ContextAwareTextSplittingRequest request, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateToolsContextAwareSplittingArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Writer.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateToolsContextAwareSplittingSecurityRequirements, - operationName: "CreateToolsContextAwareSplittingAsync"); - - using var __timeoutCancellationTokenSource = global::Writer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Writer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Writer.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Writer.PathBuilder( - path: "/v1/tools/context-aware-splitting", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Writer.AutoSDKRequestOptionsSupport.AppendQueryParameters( - path: __path, - clientParameters: Options.QueryParameters, - requestParameters: requestOptions?.QueryParameters); - 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)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in __authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2" || - __authorization.Type == "OpenIdConnect") - { - __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; - global::Writer.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateToolsContextAwareSplittingRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - request: request); - - return __httpRequest; - } - - global::System.Net.Http.HttpRequestMessage? __httpRequest = null; - global::System.Net.Http.HttpResponseMessage? __response = null; - var __attemptNumber = 0; - try - { - for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) - { - __attemptNumber = __attempt; - __httpRequest = __CreateHttpRequest(); - await global::Writer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsContextAwareSplitting", - methodName: "CreateToolsContextAwareSplittingAsync", - pathTemplate: "\"/v1/tools/context-aware-splitting\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: null, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - try - { - __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - } - catch (global::System.Net.Http.HttpRequestException __exception) - { - var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsContextAwareSplitting", - methodName: "CreateToolsContextAwareSplittingAsync", - pathTemplate: "\"/v1/tools/context-aware-splitting\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: null, - exception: __exception, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: __willRetry, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - if (!__willRetry) - { - throw; - } - - __httpRequest.Dispose(); - __httpRequest = null; - await global::Writer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Writer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsContextAwareSplitting", - methodName: "CreateToolsContextAwareSplittingAsync", - pathTemplate: "\"/v1/tools/context-aware-splitting\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: true, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - __response.Dispose(); - __response = null; - __httpRequest.Dispose(); - __httpRequest = null; - await global::Writer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - break; - } - - if (__response == null) - { - throw new global::System.InvalidOperationException("No response received."); - } - - using (__response) - { - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessCreateToolsContextAwareSplittingResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsContextAwareSplitting", - methodName: "CreateToolsContextAwareSplittingAsync", - pathTemplate: "\"/v1/tools/context-aware-splitting\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attemptNumber, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - } - else - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsContextAwareSplitting", - methodName: "CreateToolsContextAwareSplittingAsync", - pathTemplate: "\"/v1/tools/context-aware-splitting\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attemptNumber, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - } - - if (__effectiveReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessCreateToolsContextAwareSplittingResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Writer.ContextAwareSplittingResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Writer.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), - }; - } - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return - await global::Writer.ContextAwareSplittingResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - catch (global::System.Exception __ex) - { - string? __content = null; - try - { - __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - } - catch (global::System.Exception) - { - } - - throw new global::Writer.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), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Context-aware text splitting
- /// Splits a long block of text (maximum 4000 words) into smaller chunks while preserving the semantic meaning of the text and context between the chunks. - ///
- /// - /// The text to split into chunks. - /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateToolsContextAwareSplittingAsync( - string text, - global::Writer.SplittingStrategy strategy, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Writer.ContextAwareTextSplittingRequest - { - Text = text, - Strategy = strategy, - }; - - return await CreateToolsContextAwareSplittingAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsTextToGraph.g.cs b/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsTextToGraph.g.cs deleted file mode 100644 index c98cc82..0000000 --- a/src/libs/Writer/Generated/Writer.ToolsApiClient.CreateToolsTextToGraph.g.cs +++ /dev/null @@ -1,422 +0,0 @@ - -#nullable enable - -namespace Writer -{ - public partial class ToolsApiClient - { - - - private static readonly global::Writer.EndPointSecurityRequirement s_CreateToolsTextToGraphSecurityRequirement0 = - new global::Writer.EndPointSecurityRequirement - { - Authorizations = new global::Writer.EndPointAuthorizationRequirement[] - { new global::Writer.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "BearerAuth", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Writer.EndPointSecurityRequirement[] s_CreateToolsTextToGraphSecurityRequirements = - new global::Writer.EndPointSecurityRequirement[] - { s_CreateToolsTextToGraphSecurityRequirement0, - }; - partial void PrepareCreateToolsTextToGraphArguments( - global::System.Net.Http.HttpClient httpClient, - global::Writer.TextToGraphRequest request); - partial void PrepareCreateToolsTextToGraphRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Writer.TextToGraphRequest request); - partial void ProcessCreateToolsTextToGraphResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateToolsTextToGraphResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Text-to-graph
- /// Performs name entity recognition on the supplied text accepting a maximum of 35000 words. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --location --request POST https://api.writer.com/v1/tools/text-to-graph \
- /// --header "Authorization: Bearer <token>" \
- /// --header "Content-Type: application/json" \
- /// --data-raw '{"text":"A racecar has very powerful brakes that can decelerate from 200 km/h to 0 km/h in a few seconds"}' - ///
- public async global::System.Threading.Tasks.Task CreateToolsTextToGraphAsync( - - global::Writer.TextToGraphRequest request, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateToolsTextToGraphArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Writer.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateToolsTextToGraphSecurityRequirements, - operationName: "CreateToolsTextToGraphAsync"); - - using var __timeoutCancellationTokenSource = global::Writer.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Writer.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Writer.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - var __pathBuilder = new global::Writer.PathBuilder( - path: "/v1/tools/text-to-graph", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Writer.AutoSDKRequestOptionsSupport.AppendQueryParameters( - path: __path, - clientParameters: Options.QueryParameters, - requestParameters: requestOptions?.QueryParameters); - 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)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in __authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2" || - __authorization.Type == "OpenIdConnect") - { - __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; - global::Writer.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateToolsTextToGraphRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - request: request); - - return __httpRequest; - } - - global::System.Net.Http.HttpRequestMessage? __httpRequest = null; - global::System.Net.Http.HttpResponseMessage? __response = null; - var __attemptNumber = 0; - try - { - for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) - { - __attemptNumber = __attempt; - __httpRequest = __CreateHttpRequest(); - await global::Writer.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsTextToGraph", - methodName: "CreateToolsTextToGraphAsync", - pathTemplate: "\"/v1/tools/text-to-graph\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: null, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - try - { - __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - } - catch (global::System.Net.Http.HttpRequestException __exception) - { - var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsTextToGraph", - methodName: "CreateToolsTextToGraphAsync", - pathTemplate: "\"/v1/tools/text-to-graph\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: null, - exception: __exception, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: __willRetry, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - if (!__willRetry) - { - throw; - } - - __httpRequest.Dispose(); - __httpRequest = null; - await global::Writer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Writer.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsTextToGraph", - methodName: "CreateToolsTextToGraphAsync", - pathTemplate: "\"/v1/tools/text-to-graph\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: true, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - __response.Dispose(); - __response = null; - __httpRequest.Dispose(); - __httpRequest = null; - await global::Writer.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - break; - } - - if (__response == null) - { - throw new global::System.InvalidOperationException("No response received."); - } - - using (__response) - { - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessCreateToolsTextToGraphResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsTextToGraph", - methodName: "CreateToolsTextToGraphAsync", - pathTemplate: "\"/v1/tools/text-to-graph\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attemptNumber, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - } - else - { - await global::Writer.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Writer.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "createToolsTextToGraph", - methodName: "CreateToolsTextToGraphAsync", - pathTemplate: "\"/v1/tools/text-to-graph\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attemptNumber, - maxAttempts: __maxAttempts, - willRetry: false, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - } - - if (__effectiveReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessCreateToolsTextToGraphResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Writer.TextToGraphResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - } - catch (global::System.Exception __ex) - { - throw new global::Writer.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), - }; - } - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - return - await global::Writer.TextToGraphResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - } - catch (global::System.Exception __ex) - { - string? __content = null; - try - { - __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - } - catch (global::System.Exception) - { - } - - throw new global::Writer.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), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Text-to-graph
- /// Performs name entity recognition on the supplied text accepting a maximum of 35000 words. - ///
- /// - /// The text to convert into a graph structure. Maximum of 35,000 words. - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateToolsTextToGraphAsync( - string text, - global::Writer.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Writer.TextToGraphRequest - { - Text = text, - }; - - return await CreateToolsTextToGraphAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Writer/Generated/autosdk.generated-examples.json b/src/libs/Writer/Generated/autosdk.generated-examples.json index a145229..10bcb31 100644 --- a/src/libs/Writer/Generated/autosdk.generated-examples.json +++ b/src/libs/Writer/Generated/autosdk.generated-examples.json @@ -123,17 +123,6 @@ }, { "Order": 12, - "Title": "Text-to-graph", - "Slug": "text-to-graph", - "Description": "Performs name entity recognition on the supplied text accepting a maximum of 35000 words.", - "Language": "http", - "Code": "### Text-to-graph\nPOST {{host}}/v1/tools/text-to-graph\nAuthorization: Bearer {{token}}\nContent-Type: application/json\nAccept: application/json\n\n{\n \u0022text\u0022: \u0022string\u0022\n}\n\n## Responses\n# 200\n# Content-Type: application/json", - "Format": "http", - "OperationId": "createToolsTextToGraph", - "Setup": null - }, - { - "Order": 13, "Title": "Web search", "Slug": "web-search", "Description": "Search the web for information about a given query and return relevant results with source URLs.", @@ -144,7 +133,7 @@ "Setup": "This example assumes \u0060using Writer;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." }, { - "Order": 14, + "Order": 13, "Title": "Translate text", "Slug": "translate-text", "Description": "Translate text from one language to another.", @@ -155,7 +144,7 @@ "Setup": "This example assumes \u0060using Writer;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." }, { - "Order": 15, + "Order": 14, "Title": "Analyze images", "Slug": "analyze-images", "Description": "Submit images and documents with a prompt to generate an analysis. Supports JPG, PNG, PDF, and TXT files up to 7MB each.", diff --git a/src/libs/Writer/openapi.yaml b/src/libs/Writer/openapi.yaml index 2f88b39..9e3ea6c 100644 --- a/src/libs/Writer/openapi.yaml +++ b/src/libs/Writer/openapi.yaml @@ -1915,189 +1915,6 @@ paths: graph_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], ) print(application_graphs_response.graph_ids) - /v1/tools/ai-detect: - post: - security: - - bearerAuth: [] - tags: - - Tools API - summary: AI detection - description: >- - Detects if content is AI- or human-generated, with a confidence score. Content must have at least 350 - characters - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ai_detection_request' - responses: - '200': - description: Successful - content: - application/json: - schema: - $ref: '#/components/schemas/ai_detection_response' - x-codeSamples: - - lang: cURL - source: >- - curl --location --request POST https://api.writer.com/v1/tools/ai-detect \ - --header "Authorization: Bearer " \ - --header "Content-Type: application/json" \ - --data-raw '{"input":"AI and ML continue to be at the forefront of technological advancements. In - 2025, we can expect more sophisticated AI systems that can handle complex tasks with greater - efficiency. AI will play a crucial role in various sectors, including healthcare, finance, and - manufacturing. For instance, AI-powered diagnostic tools will become more accurate, helping - doctors detect diseases at an early stage. In finance, AI algorithms will enhance fraud detection - and risk management."}' - - lang: JavaScript - source: |- - import Writer from 'writer-sdk'; - - const client = new Writer({ - apiKey: process.env['WRITER_API_KEY'], // This is the default and can be omitted - }); - - async function main() { - const response = await client.tools.aiDetect({ - input: - 'AI and ML continue to be at the forefront of technological advancements. In 2025, we can expect more sophisticated AI systems that can handle complex tasks with greater efficiency. AI will play a crucial role in various sectors, including healthcare, finance, and manufacturing. For instance, AI-powered diagnostic tools will become more accurate, helping doctors detect diseases at an early stage. In finance, AI algorithms will enhance fraud detection and risk management.', - }); - - console.log(response.label); - } - - main(); - - lang: Python - source: |- - import os - from writerai import Writer - - client = Writer( - api_key=os.environ.get("WRITER_API_KEY"), # This is the default and can be omitted - ) - response = client.tools.ai_detect( - input="AI and ML continue to be at the forefront of technological advancements. In 2025, we can expect more sophisticated AI systems that can handle complex tasks with greater efficiency. AI will play a crucial role in various sectors, including healthcare, finance, and manufacturing. For instance, AI-powered diagnostic tools will become more accurate, helping doctors detect diseases at an early stage. In finance, AI algorithms will enhance fraud detection and risk management.", - ) - print(response.label) - /v1/tools/comprehend/medical: - post: - security: - - bearerAuth: [] - tags: - - Tools API - summary: Medical comprehend - description: >- - Analyze unstructured medical text to extract entities labeled with standardized medical codes and - confidence scores. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/comprehend_medical_request' - required: true - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/medical_comprehend_response' - x-codeSamples: - - lang: cURL - source: >- - curl --location --request POST https://api.writer.com/v1/tools/comprehend/medical \ - --header "Authorization: Bearer " \ - --header "Content-Type: application/json" \ - --data-raw '{"content":"the symptoms are soreness, a temperature and - cough","response_type":"Entities"}' - - lang: JavaScript - source: |- - import Writer from 'writer-sdk'; - - const client = new Writer({ - apiKey: process.env['WRITER_API_KEY'], // This is the default and can be omitted - }); - - async function main() { - const medical = await client.tools.comprehend.medical({ content: 'the symptoms are soreness, a temperature and cough', response_type: 'Entities' }); - - console.log(medical.entities); - } - - main(); - - lang: Python - source: |- - import os - from writerai import Writer - - client = Writer( - # This is the default and can be omitted - api_key=os.environ.get("WRITER_API_KEY"), - ) - medical = client.tools.comprehend.medical( - content="the symptoms are soreness, a temperature and cough", - response_type="Entities", - ) - print(medical.entities) - /v1/tools/context-aware-splitting: - post: - security: - - bearerAuth: [] - tags: - - Tools API - summary: Context-aware text splitting - description: >- - Splits a long block of text (maximum 4000 words) into smaller chunks while preserving the semantic - meaning of the text and context between the chunks. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/context_aware_text_splitting_request' - required: true - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/context_aware_splitting_response' - x-codeSamples: - - lang: cURL - source: |- - curl --location --request POST https://api.writer.com/v1/tools/context-aware-splitting \ - --header "Authorization: Bearer " \ - --header "Content-Type: application/json" \ - --data-raw '{"text":"text to split","strategy":"llm_split"}' - - lang: JavaScript - source: |- - import Writer from 'writer-sdk'; - - const client = new Writer({ - apiKey: process.env['WRITER_API_KEY'], // This is the default and can be omitted - }); - - async function main() { - const response = await client.tools.contextAwareSplitting({ strategy: 'llm_split', text: 'text to split' }); - - console.log(response.chunks); - } - - main(); - - lang: Python - source: |- - import os - from writerai import Writer - - client = Writer( - # This is the default and can be omitted - api_key=os.environ.get("WRITER_API_KEY"), - ) - response = client.tools.context_aware_splitting( - strategy="llm_split", - text="text to split", - ) - print(response.chunks) /v1/tools/pdf-parser/{file_id}: post: security: @@ -2162,80 +1979,6 @@ paths: format="text", ) print(response.content) - /v1/tools/text-to-graph: - post: - security: - - bearerAuth: [] - tags: - - Tools API - summary: Text-to-graph - description: Performs name entity recognition on the supplied text accepting a maximum of 35000 words. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/text_to_graph_request' - required: true - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/text_to_graph_response' - example: - graph: - - - racecar [RACECAR] - - has_component - - brakes [COMPONENT] - - - racecar [RACECAR] - - can_perform - - decelerate [ACTION] - - - racecar [RACECAR] - - has_property - - powerful [PROPERTY] - - - 200 km/h [VELOCITY] - - decreased_to - - 0 km/h [VELOCITY] - - - decelerate [ACTION] - - performed_by - - racecar [RACECAR] - x-codeSamples: - - lang: cURL - source: >- - curl --location --request POST https://api.writer.com/v1/tools/text-to-graph \ - --header "Authorization: Bearer " \ - --header "Content-Type: application/json" \ - --data-raw '{"text":"A racecar has very powerful brakes that can decelerate from 200 km/h to 0 - km/h in a few seconds"}' - - lang: JavaScript - source: |- - import Writer from 'writer-sdk'; - - const client = new Writer({ - apiKey: process.env['WRITER_API_KEY'], // This is the default and can be omitted - }); - - async function main() { - const response = await client.tools.textToGraph({ text: 'A racecar has very powerful brakes that can decelerate from 200 km/h to 0 km/h in a few seconds' }); - - console.log(response.graph); - } - - main(); - - lang: Python - source: |- - import os - from writerai import Writer - - client = Writer( - # This is the default and can be omitted - api_key=os.environ.get("WRITER_API_KEY"), - ) - response = client.tools.text_to_graph( - text="A racecar has very powerful brakes that can decelerate from 200 km/h to 0 km/h in a few seconds", - ) - print(response.graph) /v1/tools/web-search: post: security: @@ -4426,219 +4169,6 @@ components: - none - auto - required - ai_detection_request: - title: ai_detection_request - required: - - input - type: object - properties: - input: - type: string - description: >- - The content to determine if it is AI- or human-generated. Content must have at least 350 - characters. - example: >- - AI and ML continue to be at the forefront of technological advancements. In 2025, we can expect - more sophisticated AI systems that can handle complex tasks with greater efficiency. AI will play - a crucial role in various sectors, including healthcare, finance, and manufacturing. For instance, - AI-powered diagnostic tools will become more accurate, helping doctors detect diseases at an early - stage. In finance, AI algorithms will enhance fraud detection and risk management. - ai_detection_response: - title: ai_detection_response - required: - - label - - score - type: object - properties: - label: - type: string - enum: - - fake - - real - example: fake - score: - type: number - format: double - example: 0.6265060305595398 - comprehend_medical_request: - title: comprehend_medical_request - required: - - content - - response_type - type: object - properties: - content: - type: string - description: The text to analyze. - response_type: - $ref: '#/components/schemas/comprehend_medical_type' - description: >- - The structure of the response to return. `Entities` returns medical entities, `RxNorm` returns - medication information, `ICD-10-CM` returns diagnosis codes, and `SNOMED CT` returns medical - concepts. - comprehend_medical_type: - title: comprehend_medical_type - type: string - enum: - - Entities - - RxNorm - - ICD-10-CM - - SNOMED CT - medical_comprehend_response: - title: medical_comprehend_response - required: - - entities - type: object - properties: - entities: - description: An array of medical entities extracted from the input text. - type: array - items: - $ref: '#/components/schemas/medical_comprehend_entity' - medical_comprehend_entity: - title: medical_comprehend_entity - required: - - category - - begin_offset - - end_offset - - text - - traits - - concepts - - score - - attributes - - type - type: object - properties: - category: - type: string - begin_offset: - type: integer - format: int64 - end_offset: - type: integer - format: int64 - text: - type: string - traits: - type: array - items: - $ref: '#/components/schemas/medical_comprehend_trait' - concepts: - type: array - items: - $ref: '#/components/schemas/medical_comprehend_concept' - score: - type: number - format: double - attributes: - type: array - items: - $ref: '#/components/schemas/medical_comprehend_attribute' - type: - type: string - medical_comprehend_trait: - title: medical_comprehend_trait - required: - - score - - name - type: object - properties: - score: - type: number - format: double - name: - type: string - medical_comprehend_concept: - title: medical_comprehend_concept - required: - - code - - score - - description - type: object - properties: - code: - type: string - score: - type: number - format: double - description: - type: string - medical_comprehend_attribute: - title: medical_comprehend_attribute - required: - - relationship_score - - begin_offset - - end_offset - - text - - traits - - concepts - - score - - type - type: object - properties: - category: - type: string - relationship_score: - type: number - format: double - begin_offset: - type: integer - format: int64 - end_offset: - type: integer - format: int64 - text: - type: string - traits: - type: array - items: - $ref: '#/components/schemas/medical_comprehend_trait' - concepts: - type: array - items: - $ref: '#/components/schemas/medical_comprehend_concept' - score: - type: number - format: double - relationship_type: - type: string - type: - type: string - context_aware_text_splitting_request: - title: context_aware_text_splitting_request - required: - - text - - strategy - type: object - properties: - text: - type: string - description: The text to split into chunks. - strategy: - $ref: '#/components/schemas/splitting_strategy' - description: >- - The strategy to use for splitting the text into chunks. `llm_split` uses the language model to - split the text, `fast_split` uses a fast heuristic-based approach, and `hybrid_split` combines - both strategies. - splitting_strategy: - title: splitting_strategy - type: string - enum: - - llm_split - - fast_split - - hybrid_split - context_aware_splitting_response: - title: context_aware_splitting_response - required: - - chunks - type: object - properties: - chunks: - type: array - items: - type: string - minItems: 1 - description: An array of text chunks generated by splitting the input text based on the specified strategy. parse_pdf_request: title: parse_pdf_request required: @@ -4663,33 +4193,6 @@ components: content: type: string description: The extracted content from the PDF file, converted to the specified format. - text_to_graph_request: - title: text_to_graph_request - required: - - text - type: object - properties: - text: - type: string - description: The text to convert into a graph structure. Maximum of 35,000 words. - text_to_graph_response: - title: text_to_graph_response - required: - - graph - type: object - properties: - graph: - type: array - description: >- - The graph structure generated from the input text, represented by a string array of entities and - relationships. - items: - type: array - description: >- - A string array of entities and relationships representing the graph structure generated from the - input text. - items: - type: string vision_request: title: Vision Request required: