From 31a15ad9abf19158843492f157cf920f2676e27c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 18 Oct 2024 01:41:31 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- src/libs/AI21/Generated/AI21.Models.MessagesItem.g.cs | 8 ++++++++ src/libs/AI21/Generated/JsonConverters.MessagesItem.g.cs | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/libs/AI21/Generated/AI21.Models.MessagesItem.g.cs b/src/libs/AI21/Generated/AI21.Models.MessagesItem.g.cs index 23ef455..3a41d9b 100644 --- a/src/libs/AI21/Generated/AI21.Models.MessagesItem.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.MessagesItem.g.cs @@ -13,6 +13,11 @@ namespace AI21 /// /// /// + public global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? Role { get; } + + /// + /// + /// #if NET6_0_OR_GREATER public global::AI21.UserMessage? UserMessage { get; init; } #else @@ -154,12 +159,15 @@ public MessagesItem(global::AI21.SystemMessage? value) /// /// public MessagesItem( + global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? role, global::AI21.UserMessage? userMessage, global::AI21.AssistantMessage? assistantMessage, global::AI21.ToolMessage? toolMessage, global::AI21.SystemMessage? systemMessage ) { + Role = role; + UserMessage = userMessage; AssistantMessage = assistantMessage; ToolMessage = toolMessage; diff --git a/src/libs/AI21/Generated/JsonConverters.MessagesItem.g.cs b/src/libs/AI21/Generated/JsonConverters.MessagesItem.g.cs index 917ca4f..48e0a81 100644 --- a/src/libs/AI21/Generated/JsonConverters.MessagesItem.g.cs +++ b/src/libs/AI21/Generated/JsonConverters.MessagesItem.g.cs @@ -16,11 +16,10 @@ public class MessagesItemJsonConverter : global::System.Text.Json.Serialization. var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator? discriminator = default; var readerCopy = reader; var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator)}"); - discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); global::AI21.UserMessage? userMessage = default; if (discriminator?.Role == global::AI21.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.User) @@ -52,6 +51,7 @@ public class MessagesItemJsonConverter : global::System.Text.Json.Serialization. } var result = new global::AI21.MessagesItem( + discriminator?.Role, userMessage, assistantMessage, toolMessage,