Skip to content

Instantly share code, notes, and snippets.

@xximjasonxx
Created June 11, 2024 21:28
Show Gist options
  • Save xximjasonxx/cc50a7663d7d2890d4589439c257c35d to your computer and use it in GitHub Desktop.
Save xximjasonxx/cc50a7663d7d2890d4589439c257c35d to your computer and use it in GitHub Desktop.
int numberOne = int.Parse(args[0]);
int numberTwo = int.Parse(args[1]);
var builder = Kernel.CreateBuilder();
builder.Plugins.AddFromType<MathPlugin>();
var kernel = builder.Build();
var result = await kernel.InvokeAsync<int>("MathPlugin", "factorial", new() { { "number", numberOne } });
Console.WriteLine(result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment