From 814b9b92ca98afc1795bd01084a48d2e8a0eddb2 Mon Sep 17 00:00:00 2001 From: Ryan Sweet Date: Wed, 12 Jul 2023 09:48:51 -0700 Subject: [PATCH] cleaning up workflowContext --- Elsa.SemanticKernel/Activities/SemanticKernel.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Elsa.SemanticKernel/Activities/SemanticKernel.cs b/Elsa.SemanticKernel/Activities/SemanticKernel.cs index 3cb7fcdd3..d4f65f62a 100644 --- a/Elsa.SemanticKernel/Activities/SemanticKernel.cs +++ b/Elsa.SemanticKernel/Activities/SemanticKernel.cs @@ -107,9 +107,11 @@ public class SemanticKernelSkill : CodeActivity context.Set("input", prompt); //context.Set("wafContext", wafContext); - var answer = await kernel.RunAsync(context, function).ConfigureAwait(false); + SKContext answer = await kernel.RunAsync(context, function).ConfigureAwait(false); + string result = answer.Result; + //debug output to console - Console.WriteLine($"Skill: {skillName} Function: {functionName} Prompt: {prompt} Answer: {answer}"); - workflowContext.SetResult(answer); + Console.WriteLine($"Skill: {skillName}\nFunction: {functionName}\nPrompt: {prompt}Answer: {result}"); + workflowContext.SetResult(result); } } \ No newline at end of file