cleaning up workflowContext

This commit is contained in:
Ryan Sweet
2023-07-12 09:48:51 -07:00
parent b4b190ca43
commit 814b9b92ca

View File

@@ -107,9 +107,11 @@ public class SemanticKernelSkill : CodeActivity<string>
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);
}
}