Files
semantic-kernel/dotnet/samples/KernelSyntaxExamples/Example01_NativeFunctions.cs
T
01afd3f128 .Net: Update KernelSyntaxExamples env variables (#1832)
### Description
Updating KernelSyntaxExamples to use the same environment variable keys
as the Integration tests. This is a step toward making these tests
simpler to run, and even running them as automation in CI tests.

This is a first pass -- more cleanup to be done.

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [X] The code builds clean without any errors or warnings
- [X] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [X] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄

---------

Co-authored-by: name <email>
Co-authored-by: Dmytro Struk <[email protected]>
2023-07-17 17:36:06 +00:00

25 lines
565 B
C#

// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Threading.Tasks;
using Microsoft.SemanticKernel.Skills.Core;
// ReSharper disable once InconsistentNaming
public static class Example01_NativeFunctions
{
public static Task RunAsync()
{
Console.WriteLine("======== Functions ========");
// Load native skill
var text = new TextSkill();
// Use function without kernel
var result = text.Uppercase("ciao!");
Console.WriteLine(result);
return Task.CompletedTask;
}
}