Created
June 11, 2024 21:54
-
-
Save xximjasonxx/7cad6ab40cbe7a15210ad6c817eafeed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var builder = Kernel.CreateBuilder(); | |
builder.Plugins.AddFromType<MathPlugin>(); | |
builder.AddAzureOpenAIChatCompletion("<deployment name>", "<endpoint>", "<key>"); | |
var kernel = builder.Build(); | |
#pragma warning disable // Suppress the diagnostic messages | |
var planner = new HandlebarsPlanner(new HandlebarsPlannerOptions() { AllowLoops = true }); | |
var plan = await planner.CreatePlanAsync(kernel, $"Get the result of subtracting 10 from the sum of factorials {numberOne} and {numberTwo}"); | |
var planResult = await plan.InvokeAsync(kernel, new KernelArguments()); | |
Console.WriteLine(planResult); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment