From fc4a009f45f6c03af96663f2cecf0ecac45f9850 Mon Sep 17 00:00:00 2001 From: xbotter Date: Thu, 19 Oct 2023 16:13:36 +0800 Subject: [PATCH] fix chat response message --- apps/SKonsole/Commands/PromptChatCommand.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/SKonsole/Commands/PromptChatCommand.cs b/apps/SKonsole/Commands/PromptChatCommand.cs index c2d4b53..7b61e7a 100644 --- a/apps/SKonsole/Commands/PromptChatCommand.cs +++ b/apps/SKonsole/Commands/PromptChatCommand.cs @@ -73,7 +73,8 @@ private static async Task RunChat(IKernel kernel, ILogger? logger, ISKFunction c var history = string.Empty; contextVariables.Set("history", history); - var botMessage = await kernel.RunAsync(contextVariables, chatFunction); + var result = await kernel.RunAsync(contextVariables, chatFunction); + var botMessage = result.GetValue(); var userMessage = string.Empty; static void HorizontalRule(string title, string style = "white bold") @@ -115,7 +116,7 @@ static void HorizontalRule(string title, string style = "white bold") var result = await kernel.RunAsync(contextVariables, chatFunction); task.StopTask(); - return result; + return result.GetValue(); }); } }