Skip to content

Commit

Permalink
.Net: Fixing issues with functions that take a parameter. (microsoft#…
Browse files Browse the repository at this point in the history
…4240)

### Motivation and Context

In our example named Example09_FunctionTypes there are a few
KernelFunction examples that's relying on the special `input` parameter
that is no longer supported. This PR fixes the example by specifying a
value for the function parameter in the KernelArguments.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

Co-authored-by: Ben Thomas <bentho@microsoft.com>
  • Loading branch information
alliscode and Ben Thomas authored Dec 13, 2023
1 parent be89d6b commit 53b1c95
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dotnet/samples/KernelSyntaxExamples/Example09_FunctionTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ public static async Task RunAsync()
await kernel.InvokeAsync(plugin["type04"]);
await kernel.InvokeAsync(kernel.Plugins["test"]["type04"]);

await kernel.InvokeAsync(plugin["type05"]);
await kernel.InvokeAsync(kernel.Plugins["test"]["type05"]);
await kernel.InvokeAsync(plugin["type05"], new() { ["x"] = "" });
await kernel.InvokeAsync(kernel.Plugins["test"]["type05"], new() { ["x"] = "" });

await kernel.InvokeAsync(plugin["type06"]);
await kernel.InvokeAsync(kernel.Plugins["test"]["type06"]);
await kernel.InvokeAsync(plugin["type06"], new() { ["x"] = "" });
await kernel.InvokeAsync(kernel.Plugins["test"]["type06"], new() { ["x"] = "" });

await kernel.InvokeAsync(plugin["type07"]);
await kernel.InvokeAsync(kernel.Plugins["test"]["type07"]);
await kernel.InvokeAsync(plugin["type07"], new() { ["x"] = "" });
await kernel.InvokeAsync(kernel.Plugins["test"]["type07"], new() { ["x"] = "" });

await kernel.InvokeAsync(plugin["type08"]);
await kernel.InvokeAsync(kernel.Plugins["test"]["type08"]);
await kernel.InvokeAsync(plugin["type08"], new() { ["x"] = "" });
await kernel.InvokeAsync(kernel.Plugins["test"]["type08"], new() { ["x"] = "" });

await kernel.InvokeAsync(plugin["type09"]);
await kernel.InvokeAsync(kernel.Plugins["test"]["type09"]);
Expand Down

0 comments on commit 53b1c95

Please sign in to comment.