Skip to content

Commit

Permalink
.Net: comments and var name inconsistent with source (#8832)
Browse files Browse the repository at this point in the history
### Motivation and Context

Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  comment and variable name are inconsistent with actual code
  3. What problem does it solve?
  readability
  5. What scenario does it contribute to?
  Step8 of the Getting started test cases
  7. If it fixes an open issue, please link to the issue here.


### Description

This is a cosmetic change to improve the consistency of the code base
and its comment/var names

### Contribution Checklist

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

- [x] The code builds clean without any errors or warnings
- [x] 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
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
  • Loading branch information
ebCrypto authored Oct 25, 2024
1 parent f08c2af commit 92b2b21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dotnet/samples/GettingStarted/Step8_Pipelining.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ public async Task RunAsync()

Console.WriteLine("================ PIPELINE ================");
{
// Create a pipeline of functions that will parse a string into an int, multiply it by a double, truncate it to an int, and then humanize it.
KernelFunction parseInt32 = KernelFunctionFactory.CreateFromMethod((string s) => double.Parse(s, CultureInfo.InvariantCulture), "parseInt32");
// Create a pipeline of functions that will parse a string into a double, multiply it by a double, truncate it to an int, and then humanize it.
KernelFunction parseDouble = KernelFunctionFactory.CreateFromMethod((string s) => double.Parse(s, CultureInfo.InvariantCulture), "parseDouble");
KernelFunction multiplyByN = KernelFunctionFactory.CreateFromMethod((double i, double n) => i * n, "multiplyByN");
KernelFunction truncate = KernelFunctionFactory.CreateFromMethod((double d) => (int)d, "truncate");
KernelFunction humanize = KernelFunctionFactory.CreateFromPrompt(new PromptTemplateConfig()
{
Template = "Spell out this number in English: {{$number}}",
InputVariables = [new() { Name = "number" }],
});
KernelFunction pipeline = KernelFunctionCombinators.Pipe([parseInt32, multiplyByN, truncate, humanize], "pipeline");
KernelFunction pipeline = KernelFunctionCombinators.Pipe([parseDouble, multiplyByN, truncate, humanize], "pipeline");

KernelArguments args = new()
{
Expand Down

0 comments on commit 92b2b21

Please sign in to comment.