From 9f6b0116e4619d7952cdd1d66197e0c64084ef4c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 12 Aug 2024 12:42:32 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...nConverters.CreateModelResponseStatus.g.cs | 49 ------- ...ers.CreateModelResponseStatusNullable.g.cs | 56 -------- ...erateChatCompletionResponseDoneReason.g.cs | 49 ------- ...tCompletionResponseDoneReasonNullable.g.cs | 56 -------- ...sonConverters.PullModelResponseStatus.g.cs | 49 ------- ...rters.PullModelResponseStatusNullable.g.cs | 56 -------- .../Generated/JsonSerializerContext.g.cs | 10 +- .../Generated/JsonSerializerContextTypes.g.cs | 126 +++++++++++------- ....CompletionsClient.GenerateCompletion.g.cs | 2 +- .../Ollama.Models.CreateModelResponse.g.cs | 6 +- ...lama.Models.CreateModelResponseStatus.g.cs | 57 -------- ...Models.GenerateChatCompletionResponse.g.cs | 6 +- ...erateChatCompletionResponseDoneReason.g.cs | 57 -------- ...lama.Models.GenerateCompletionRequest.g.cs | 2 +- .../Generated/Ollama.Models.Message.g.cs | 2 +- .../Generated/Ollama.Models.ModelDetails.g.cs | 2 +- .../Ollama.Models.ModelInformation.g.cs | 8 +- .../Ollama.Models.PullModelResponse.g.cs | 6 +- ...Ollama.Models.PullModelResponseStatus.g.cs | 75 ----------- .../Ollama.Models.RequestOptions.g.cs | 2 +- 20 files changed, 98 insertions(+), 578 deletions(-) delete mode 100644 src/libs/Ollama/Generated/JsonConverters.CreateModelResponseStatus.g.cs delete mode 100644 src/libs/Ollama/Generated/JsonConverters.CreateModelResponseStatusNullable.g.cs delete mode 100644 src/libs/Ollama/Generated/JsonConverters.GenerateChatCompletionResponseDoneReason.g.cs delete mode 100644 src/libs/Ollama/Generated/JsonConverters.GenerateChatCompletionResponseDoneReasonNullable.g.cs delete mode 100644 src/libs/Ollama/Generated/JsonConverters.PullModelResponseStatus.g.cs delete mode 100644 src/libs/Ollama/Generated/JsonConverters.PullModelResponseStatusNullable.g.cs delete mode 100644 src/libs/Ollama/Generated/Ollama.Models.CreateModelResponseStatus.g.cs delete mode 100644 src/libs/Ollama/Generated/Ollama.Models.GenerateChatCompletionResponseDoneReason.g.cs delete mode 100644 src/libs/Ollama/Generated/Ollama.Models.PullModelResponseStatus.g.cs diff --git a/src/libs/Ollama/Generated/JsonConverters.CreateModelResponseStatus.g.cs b/src/libs/Ollama/Generated/JsonConverters.CreateModelResponseStatus.g.cs deleted file mode 100644 index dee3a84..0000000 --- a/src/libs/Ollama/Generated/JsonConverters.CreateModelResponseStatus.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenApiGenerator.JsonConverters -{ - /// - public sealed class CreateModelResponseStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Ollama.CreateModelResponseStatus 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::Ollama.CreateModelResponseStatusExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Ollama.CreateModelResponseStatus)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Ollama.CreateModelResponseStatus value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Ollama.CreateModelResponseStatusExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Ollama/Generated/JsonConverters.CreateModelResponseStatusNullable.g.cs b/src/libs/Ollama/Generated/JsonConverters.CreateModelResponseStatusNullable.g.cs deleted file mode 100644 index bea588a..0000000 --- a/src/libs/Ollama/Generated/JsonConverters.CreateModelResponseStatusNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenApiGenerator.JsonConverters -{ - /// - public sealed class CreateModelResponseStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Ollama.CreateModelResponseStatus? 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::Ollama.CreateModelResponseStatusExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Ollama.CreateModelResponseStatus)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Ollama.CreateModelResponseStatus? 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::Ollama.CreateModelResponseStatusExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Ollama/Generated/JsonConverters.GenerateChatCompletionResponseDoneReason.g.cs b/src/libs/Ollama/Generated/JsonConverters.GenerateChatCompletionResponseDoneReason.g.cs deleted file mode 100644 index 51fe9e5..0000000 --- a/src/libs/Ollama/Generated/JsonConverters.GenerateChatCompletionResponseDoneReason.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenApiGenerator.JsonConverters -{ - /// - public sealed class GenerateChatCompletionResponseDoneReasonJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Ollama.GenerateChatCompletionResponseDoneReason 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::Ollama.GenerateChatCompletionResponseDoneReasonExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Ollama.GenerateChatCompletionResponseDoneReason)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Ollama.GenerateChatCompletionResponseDoneReason value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Ollama.GenerateChatCompletionResponseDoneReasonExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Ollama/Generated/JsonConverters.GenerateChatCompletionResponseDoneReasonNullable.g.cs b/src/libs/Ollama/Generated/JsonConverters.GenerateChatCompletionResponseDoneReasonNullable.g.cs deleted file mode 100644 index 389acf8..0000000 --- a/src/libs/Ollama/Generated/JsonConverters.GenerateChatCompletionResponseDoneReasonNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenApiGenerator.JsonConverters -{ - /// - public sealed class GenerateChatCompletionResponseDoneReasonNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Ollama.GenerateChatCompletionResponseDoneReason? 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::Ollama.GenerateChatCompletionResponseDoneReasonExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Ollama.GenerateChatCompletionResponseDoneReason)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Ollama.GenerateChatCompletionResponseDoneReason? 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::Ollama.GenerateChatCompletionResponseDoneReasonExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Ollama/Generated/JsonConverters.PullModelResponseStatus.g.cs b/src/libs/Ollama/Generated/JsonConverters.PullModelResponseStatus.g.cs deleted file mode 100644 index e88bd8e..0000000 --- a/src/libs/Ollama/Generated/JsonConverters.PullModelResponseStatus.g.cs +++ /dev/null @@ -1,49 +0,0 @@ -#nullable enable - -namespace OpenApiGenerator.JsonConverters -{ - /// - public sealed class PullModelResponseStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Ollama.PullModelResponseStatus 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::Ollama.PullModelResponseStatusExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Ollama.PullModelResponseStatus)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Ollama.PullModelResponseStatus value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Ollama.PullModelResponseStatusExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Ollama/Generated/JsonConverters.PullModelResponseStatusNullable.g.cs b/src/libs/Ollama/Generated/JsonConverters.PullModelResponseStatusNullable.g.cs deleted file mode 100644 index 6aadcc5..0000000 --- a/src/libs/Ollama/Generated/JsonConverters.PullModelResponseStatusNullable.g.cs +++ /dev/null @@ -1,56 +0,0 @@ -#nullable enable - -namespace OpenApiGenerator.JsonConverters -{ - /// - public sealed class PullModelResponseStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Ollama.PullModelResponseStatus? 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::Ollama.PullModelResponseStatusExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Ollama.PullModelResponseStatus)numValue; - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Ollama.PullModelResponseStatus? 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::Ollama.PullModelResponseStatusExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Ollama/Generated/JsonSerializerContext.g.cs b/src/libs/Ollama/Generated/JsonSerializerContext.g.cs index 9d7f0c7..29350ff 100644 --- a/src/libs/Ollama/Generated/JsonSerializerContext.g.cs +++ b/src/libs/Ollama/Generated/JsonSerializerContext.g.cs @@ -12,20 +12,14 @@ namespace Ollama { typeof(global::OpenApiGenerator.JsonConverters.ResponseFormatJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ResponseFormatNullableJsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.GenerateChatCompletionResponseDoneReasonJsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.GenerateChatCompletionResponseDoneReasonNullableJsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.DoneReasonVariant2JsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.DoneReasonVariant2NullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.MessageRoleJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.MessageRoleNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ToolTypeJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.ToolTypeNullableJsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.CreateModelResponseStatusJsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.CreateModelResponseStatusNullableJsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.DoneReasonVariant2JsonConverter), + typeof(global::OpenApiGenerator.JsonConverters.DoneReasonVariant2NullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.CreateModelStatusVariant2JsonConverter), typeof(global::OpenApiGenerator.JsonConverters.CreateModelStatusVariant2NullableJsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.PullModelResponseStatusJsonConverter), - typeof(global::OpenApiGenerator.JsonConverters.PullModelResponseStatusNullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.PullModelStatusVariant2JsonConverter), typeof(global::OpenApiGenerator.JsonConverters.PullModelStatusVariant2NullableJsonConverter), typeof(global::OpenApiGenerator.JsonConverters.PushModelResponseStatusJsonConverter), diff --git a/src/libs/Ollama/Generated/JsonSerializerContextTypes.g.cs b/src/libs/Ollama/Generated/JsonSerializerContextTypes.g.cs index c026d6b..5635299 100644 --- a/src/libs/Ollama/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/Ollama/Generated/JsonSerializerContextTypes.g.cs @@ -13,27 +13,27 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public string? Type0 { get; set; } + public global::Ollama.GenerateCompletionRequest? Type0 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1 { get; set; } + public string? Type1 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type2 { get; set; } + public global::System.Collections.Generic.IList? Type2 { get; set; } /// /// /// - public global::Ollama.RequestOptions? Type3 { get; set; } + public global::System.Collections.Generic.IList? Type3 { get; set; } /// /// /// - public global::Ollama.ResponseFormat? Type4 { get; set; } + public long? Type4 { get; set; } /// /// /// - public bool? Type5 { get; set; } + public global::Ollama.RequestOptions? Type5 { get; set; } /// /// /// @@ -45,47 +45,47 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.DateTime? Type8 { get; set; } + public bool? Type8 { get; set; } /// /// /// - public long? Type9 { get; set; } + public global::Ollama.ResponseFormat? Type9 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type10 { get; set; } + public global::Ollama.VersionResponse? Type10 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type11 { get; set; } + public global::Ollama.GenerateCompletionResponse? Type11 { get; set; } /// /// /// - public global::Ollama.Message? Type12 { get; set; } + public global::System.DateTime? Type12 { get; set; } /// /// /// - public global::System.AnyOf? Type13 { get; set; } + public global::Ollama.GenerateChatCompletionRequest? Type13 { get; set; } /// /// /// - public global::Ollama.MessageRole? Type14 { get; set; } + public global::System.Collections.Generic.IList? Type14 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type15 { get; set; } + public global::Ollama.Message? Type15 { get; set; } /// /// /// - public global::Ollama.ToolType? Type16 { get; set; } + public global::Ollama.MessageRole? Type16 { get; set; } /// /// /// - public global::Ollama.ToolFunction? Type17 { get; set; } + public global::System.Collections.Generic.IList? Type17 { get; set; } /// /// /// - public global::Ollama.ToolFunctionParams? Type18 { get; set; } + public global::Ollama.ToolCall? Type18 { get; set; } /// /// /// @@ -97,114 +97,150 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.IList? Type21 { get; set; } + public global::System.Collections.Generic.IList? Type21 { get; set; } /// /// /// - public global::System.AnyOf? Type22 { get; set; } + public global::Ollama.Tool? Type22 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type23 { get; set; } + public global::Ollama.ToolType? Type23 { get; set; } /// /// /// - public global::Ollama.ModelDetails? Type24 { get; set; } + public global::Ollama.ToolFunction? Type24 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type25 { get; set; } + public global::Ollama.ToolFunctionParams? Type25 { get; set; } /// /// /// - public global::Ollama.ModelInformation? Type26 { get; set; } + public global::Ollama.GenerateChatCompletionResponse? Type26 { get; set; } /// /// /// - public global::System.AnyOf? Type27 { get; set; } + public global::Ollama.DoneReason? Type27 { get; set; } /// /// /// - public global::System.AnyOf? Type28 { get; set; } + public global::Ollama.DoneReasonVariant2? Type28 { get; set; } /// /// /// - public global::Ollama.VersionResponse? Type29 { get; set; } + public global::Ollama.GenerateEmbeddingRequest? Type29 { get; set; } /// /// /// - public global::Ollama.GenerateCompletionRequest? Type30 { get; set; } + public global::Ollama.GenerateEmbeddingResponse? Type30 { get; set; } /// /// /// - public global::Ollama.GenerateCompletionResponse? Type31 { get; set; } + public global::System.Collections.Generic.IList? Type31 { get; set; } /// /// /// - public global::Ollama.GenerateChatCompletionRequest? Type32 { get; set; } + public double? Type32 { get; set; } /// /// /// - public global::Ollama.GenerateChatCompletionResponse? Type33 { get; set; } + public global::Ollama.CreateModelRequest? Type33 { get; set; } /// /// /// - public global::Ollama.GenerateEmbeddingRequest? Type34 { get; set; } + public global::Ollama.CreateModelResponse? Type34 { get; set; } /// /// /// - public global::Ollama.GenerateEmbeddingResponse? Type35 { get; set; } + public global::Ollama.CreateModelStatus? Type35 { get; set; } /// /// /// - public global::Ollama.CreateModelRequest? Type36 { get; set; } + public global::Ollama.CreateModelStatusVariant2? Type36 { get; set; } /// /// /// - public global::Ollama.CreateModelResponse? Type37 { get; set; } + public global::Ollama.ModelsResponse? Type37 { get; set; } /// /// /// - public global::Ollama.ModelsResponse? Type38 { get; set; } + public global::System.Collections.Generic.IList? Type38 { get; set; } /// /// /// - public global::Ollama.ProcessResponse? Type39 { get; set; } + public global::Ollama.Model? Type39 { get; set; } /// /// /// - public global::Ollama.ModelInfoRequest? Type40 { get; set; } + public global::Ollama.ModelDetails? Type40 { get; set; } /// /// /// - public global::Ollama.ModelInfo? Type41 { get; set; } + public global::Ollama.ModelInformation? Type41 { get; set; } /// /// /// - public global::Ollama.CopyModelRequest? Type42 { get; set; } + public global::Ollama.ProcessResponse? Type42 { get; set; } /// /// /// - public global::Ollama.DeleteModelRequest? Type43 { get; set; } + public global::System.Collections.Generic.IList? Type43 { get; set; } /// /// /// - public global::Ollama.PullModelRequest? Type44 { get; set; } + public global::Ollama.ProcessModel? Type44 { get; set; } /// /// /// - public global::Ollama.PullModelResponse? Type45 { get; set; } + public global::Ollama.ModelInfoRequest? Type45 { get; set; } /// /// /// - public global::Ollama.PushModelRequest? Type46 { get; set; } + public global::Ollama.ModelInfo? Type46 { get; set; } /// /// /// - public global::Ollama.PushModelResponse? Type47 { get; set; } + public global::Ollama.CopyModelRequest? Type47 { get; set; } /// /// /// - public byte[]? Type48 { get; set; } + public global::Ollama.DeleteModelRequest? Type48 { get; set; } + /// + /// + /// + public global::Ollama.PullModelRequest? Type49 { get; set; } + /// + /// + /// + public global::Ollama.PullModelResponse? Type50 { get; set; } + /// + /// + /// + public global::Ollama.PullModelStatus? Type51 { get; set; } + /// + /// + /// + public global::Ollama.PullModelStatusVariant2? Type52 { get; set; } + /// + /// + /// + public global::Ollama.PushModelRequest? Type53 { get; set; } + /// + /// + /// + public global::Ollama.PushModelResponse? Type54 { get; set; } + /// + /// + /// + public global::System.AnyOf? Type55 { get; set; } + /// + /// + /// + public global::Ollama.PushModelResponseStatus? Type56 { get; set; } + /// + /// + /// + public byte[]? Type57 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Ollama/Generated/Ollama.CompletionsClient.GenerateCompletion.g.cs b/src/libs/Ollama/Generated/Ollama.CompletionsClient.GenerateCompletion.g.cs index cd02b6a..40fc35f 100644 --- a/src/libs/Ollama/Generated/Ollama.CompletionsClient.GenerateCompletion.g.cs +++ b/src/libs/Ollama/Generated/Ollama.CompletionsClient.GenerateCompletion.g.cs @@ -135,7 +135,7 @@ partial void ProcessGenerateCompletionResponse( string model, string prompt, string? suffix = default, - global::System.Collections.Generic.IList? images = default, + global::System.Collections.Generic.IList? images = default, string? system = default, string? template = default, global::System.Collections.Generic.IList? context = default, diff --git a/src/libs/Ollama/Generated/Ollama.Models.CreateModelResponse.g.cs b/src/libs/Ollama/Generated/Ollama.Models.CreateModelResponse.g.cs index 5275393..5a24005 100644 --- a/src/libs/Ollama/Generated/Ollama.Models.CreateModelResponse.g.cs +++ b/src/libs/Ollama/Generated/Ollama.Models.CreateModelResponse.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace Ollama @@ -14,8 +12,8 @@ public sealed partial class CreateModelResponse /// Status creating the model /// [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))] - public global::System.AnyOf? Status { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.CreateModelStatusJsonConverter))] + public global::Ollama.CreateModelStatus? Status { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/Ollama/Generated/Ollama.Models.CreateModelResponseStatus.g.cs b/src/libs/Ollama/Generated/Ollama.Models.CreateModelResponseStatus.g.cs deleted file mode 100644 index e5dbc4c..0000000 --- a/src/libs/Ollama/Generated/Ollama.Models.CreateModelResponseStatus.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace Ollama -{ - /// - /// - /// - public enum CreateModelResponseStatus - { - /// - /// - /// - CreatingSystemLayer, - /// - /// - /// - ParsingModelfile, - /// - /// - /// - Success, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class CreateModelResponseStatusExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this CreateModelResponseStatus value) - { - return value switch - { - CreateModelResponseStatus.CreatingSystemLayer => "creating system layer", - CreateModelResponseStatus.ParsingModelfile => "parsing modelfile", - CreateModelResponseStatus.Success => "success", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static CreateModelResponseStatus? ToEnum(string value) - { - return value switch - { - "creating system layer" => CreateModelResponseStatus.CreatingSystemLayer, - "parsing modelfile" => CreateModelResponseStatus.ParsingModelfile, - "success" => CreateModelResponseStatus.Success, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Ollama/Generated/Ollama.Models.GenerateChatCompletionResponse.g.cs b/src/libs/Ollama/Generated/Ollama.Models.GenerateChatCompletionResponse.g.cs index 67fbab3..8a3635d 100644 --- a/src/libs/Ollama/Generated/Ollama.Models.GenerateChatCompletionResponse.g.cs +++ b/src/libs/Ollama/Generated/Ollama.Models.GenerateChatCompletionResponse.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace Ollama @@ -45,8 +43,8 @@ public sealed partial class GenerateChatCompletionResponse /// Reason why the model is done generating a response. /// [global::System.Text.Json.Serialization.JsonPropertyName("done_reason")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))] - public global::System.AnyOf? DoneReason { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.DoneReasonJsonConverter))] + public global::Ollama.DoneReason? DoneReason { get; set; } /// /// Time spent generating the response.
diff --git a/src/libs/Ollama/Generated/Ollama.Models.GenerateChatCompletionResponseDoneReason.g.cs b/src/libs/Ollama/Generated/Ollama.Models.GenerateChatCompletionResponseDoneReason.g.cs deleted file mode 100644 index 97b8af0..0000000 --- a/src/libs/Ollama/Generated/Ollama.Models.GenerateChatCompletionResponseDoneReason.g.cs +++ /dev/null @@ -1,57 +0,0 @@ - -#nullable enable - -namespace Ollama -{ - /// - /// - /// - public enum GenerateChatCompletionResponseDoneReason - { - /// - /// - /// - Stop, - /// - /// - /// - Length, - /// - /// - /// - Load, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class GenerateChatCompletionResponseDoneReasonExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this GenerateChatCompletionResponseDoneReason value) - { - return value switch - { - GenerateChatCompletionResponseDoneReason.Stop => "stop", - GenerateChatCompletionResponseDoneReason.Length => "length", - GenerateChatCompletionResponseDoneReason.Load => "load", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static GenerateChatCompletionResponseDoneReason? ToEnum(string value) - { - return value switch - { - "stop" => GenerateChatCompletionResponseDoneReason.Stop, - "length" => GenerateChatCompletionResponseDoneReason.Length, - "load" => GenerateChatCompletionResponseDoneReason.Load, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Ollama/Generated/Ollama.Models.GenerateCompletionRequest.g.cs b/src/libs/Ollama/Generated/Ollama.Models.GenerateCompletionRequest.g.cs index 8e88361..0e190d1 100644 --- a/src/libs/Ollama/Generated/Ollama.Models.GenerateCompletionRequest.g.cs +++ b/src/libs/Ollama/Generated/Ollama.Models.GenerateCompletionRequest.g.cs @@ -35,7 +35,7 @@ public sealed partial class GenerateCompletionRequest /// (optional) a list of Base64-encoded images to include in the message (for multimodal models such as llava) ///
[global::System.Text.Json.Serialization.JsonPropertyName("images")] - public global::System.Collections.Generic.IList? Images { get; set; } + public global::System.Collections.Generic.IList? Images { get; set; } /// /// The system prompt to (overrides what is defined in the Modelfile). diff --git a/src/libs/Ollama/Generated/Ollama.Models.Message.g.cs b/src/libs/Ollama/Generated/Ollama.Models.Message.g.cs index e8b28b0..70037ac 100644 --- a/src/libs/Ollama/Generated/Ollama.Models.Message.g.cs +++ b/src/libs/Ollama/Generated/Ollama.Models.Message.g.cs @@ -28,7 +28,7 @@ public sealed partial class Message /// (optional) a list of Base64-encoded images to include in the message (for multimodal models such as llava) /// [global::System.Text.Json.Serialization.JsonPropertyName("images")] - public global::System.Collections.Generic.IList? Images { get; set; } + public global::System.Collections.Generic.IList? Images { get; set; } /// /// A list of tools the model wants to call. diff --git a/src/libs/Ollama/Generated/Ollama.Models.ModelDetails.g.cs b/src/libs/Ollama/Generated/Ollama.Models.ModelDetails.g.cs index 9eabc20..1fb3f6d 100644 --- a/src/libs/Ollama/Generated/Ollama.Models.ModelDetails.g.cs +++ b/src/libs/Ollama/Generated/Ollama.Models.ModelDetails.g.cs @@ -30,7 +30,7 @@ public sealed partial class ModelDetails /// The families of the model. /// [global::System.Text.Json.Serialization.JsonPropertyName("families")] - public global::System.Collections.Generic.IList? Families { get; set; } + public global::System.Collections.Generic.IList? Families { get; set; } /// /// The size of the model's parameters. diff --git a/src/libs/Ollama/Generated/Ollama.Models.ModelInformation.g.cs b/src/libs/Ollama/Generated/Ollama.Models.ModelInformation.g.cs index 891daf4..89b1f65 100644 --- a/src/libs/Ollama/Generated/Ollama.Models.ModelInformation.g.cs +++ b/src/libs/Ollama/Generated/Ollama.Models.ModelInformation.g.cs @@ -12,25 +12,25 @@ public sealed partial class ModelInformation /// The architecture of the model. /// [global::System.Text.Json.Serialization.JsonPropertyName("general.architecture")] - public string? General_architecture { get; set; } + public string? GeneralArchitecture { get; set; } /// /// The file type of the model. /// [global::System.Text.Json.Serialization.JsonPropertyName("general.file_type")] - public int? General_fileType { get; set; } + public int? GeneralFileType { get; set; } /// /// The number of parameters in the model. /// [global::System.Text.Json.Serialization.JsonPropertyName("general.parameter_count")] - public long? General_parameterCount { get; set; } + public long? GeneralParameterCount { get; set; } /// /// The number of parameters in the model. /// [global::System.Text.Json.Serialization.JsonPropertyName("general.quantization_version")] - public int? General_quantizationVersion { get; set; } + public int? GeneralQuantizationVersion { get; set; } /// /// Additional properties that are not explicitly defined in the schema diff --git a/src/libs/Ollama/Generated/Ollama.Models.PullModelResponse.g.cs b/src/libs/Ollama/Generated/Ollama.Models.PullModelResponse.g.cs index 11f4cfe..bf071b6 100644 --- a/src/libs/Ollama/Generated/Ollama.Models.PullModelResponse.g.cs +++ b/src/libs/Ollama/Generated/Ollama.Models.PullModelResponse.g.cs @@ -1,6 +1,4 @@ -#pragma warning disable CS0618 // Type or member is obsolete - #nullable enable namespace Ollama @@ -17,8 +15,8 @@ public sealed partial class PullModelResponse /// Example: pulling manifest /// [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))] - public global::System.AnyOf? Status { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.PullModelStatusJsonConverter))] + public global::Ollama.PullModelStatus? Status { get; set; } /// /// The model's digest.
diff --git a/src/libs/Ollama/Generated/Ollama.Models.PullModelResponseStatus.g.cs b/src/libs/Ollama/Generated/Ollama.Models.PullModelResponseStatus.g.cs deleted file mode 100644 index e816d02..0000000 --- a/src/libs/Ollama/Generated/Ollama.Models.PullModelResponseStatus.g.cs +++ /dev/null @@ -1,75 +0,0 @@ - -#nullable enable - -namespace Ollama -{ - /// - /// - /// - public enum PullModelResponseStatus - { - /// - /// - /// - PullingManifest, - /// - /// - /// - DownloadingDigestname, - /// - /// - /// - VerifyingSha256Digest, - /// - /// - /// - WritingManifest, - /// - /// - /// - RemovingAnyUnusedLayers, - /// - /// - /// - Success, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class PullModelResponseStatusExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this PullModelResponseStatus value) - { - return value switch - { - PullModelResponseStatus.PullingManifest => "pulling manifest", - PullModelResponseStatus.DownloadingDigestname => "downloading digestname", - PullModelResponseStatus.VerifyingSha256Digest => "verifying sha256 digest", - PullModelResponseStatus.WritingManifest => "writing manifest", - PullModelResponseStatus.RemovingAnyUnusedLayers => "removing any unused layers", - PullModelResponseStatus.Success => "success", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static PullModelResponseStatus? ToEnum(string value) - { - return value switch - { - "pulling manifest" => PullModelResponseStatus.PullingManifest, - "downloading digestname" => PullModelResponseStatus.DownloadingDigestname, - "verifying sha256 digest" => PullModelResponseStatus.VerifyingSha256Digest, - "writing manifest" => PullModelResponseStatus.WritingManifest, - "removing any unused layers" => PullModelResponseStatus.RemovingAnyUnusedLayers, - "success" => PullModelResponseStatus.Success, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Ollama/Generated/Ollama.Models.RequestOptions.g.cs b/src/libs/Ollama/Generated/Ollama.Models.RequestOptions.g.cs index 632e2bf..3266452 100644 --- a/src/libs/Ollama/Generated/Ollama.Models.RequestOptions.g.cs +++ b/src/libs/Ollama/Generated/Ollama.Models.RequestOptions.g.cs @@ -132,7 +132,7 @@ public sealed partial class RequestOptions /// sequence. ///
[global::System.Text.Json.Serialization.JsonPropertyName("stop")] - public global::System.Collections.Generic.IList? Stop { get; set; } + public global::System.Collections.Generic.IList? Stop { get; set; } /// /// Enable NUMA support. (Default: false)