diff --git a/LLama.SemanticKernel/ExtensionMethods.cs b/LLama.SemanticKernel/ExtensionMethods.cs index 6a48eab0..0bb25411 100644 --- a/LLama.SemanticKernel/ExtensionMethods.cs +++ b/LLama.SemanticKernel/ExtensionMethods.cs @@ -3,9 +3,9 @@ using Microsoft.SemanticKernel.AI.ChatCompletion; namespace LLamaSharp.SemanticKernel; -internal static class ExtensionMethods +public static class ExtensionMethods { - internal static global::LLama.Common.ChatHistory ToLLamaSharpChatHistory(this ChatHistory chatHistory) + public static global::LLama.Common.ChatHistory ToLLamaSharpChatHistory(this ChatHistory chatHistory) { if (chatHistory is null) { @@ -16,7 +16,7 @@ internal static class ExtensionMethods foreach (var chat in chatHistory) { - var role = Enum.TryParse(chat.Role.Label, out var _role) ? _role : global::LLama.Common.AuthorRole.Unknown; + var role = Enum.TryParse(chat.Role.Label, true, out var _role) ? _role : global::LLama.Common.AuthorRole.Unknown; history.AddMessage(role, chat.Content); }