mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
### Motivation and Context Slimming down the kernel core project, nuget package. ### Description These "Core Skills" are good ones to have, but are not fundamental to the operation of SK. They will continue to be included in the "Microsoft.SemanticKernel" nuget metapackage, but if a developer chooses to just install the minimal "Microsoft.SemanticKernel.Core", they may not want these skills. This packages them so that they are now optional. ### 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: Lee Miller <[email protected]>
33 lines
913 B
C#
33 lines
913 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.Extensions.Logging;
|
|
using Microsoft.SemanticKernel;
|
|
using Microsoft.SemanticKernel.Orchestration;
|
|
using Microsoft.SemanticKernel.Skills.Core;
|
|
using RepoUtils;
|
|
|
|
// ReSharper disable once InconsistentNaming
|
|
public static class Example02_Pipeline
|
|
{
|
|
private static readonly ILogger s_log = ConsoleLogger.Log;
|
|
|
|
public static async Task RunAsync()
|
|
{
|
|
Console.WriteLine("======== Pipeline ========");
|
|
|
|
IKernel kernel = new KernelBuilder().WithLogger(s_log).Build();
|
|
|
|
// Load native skill
|
|
var text = kernel.ImportSkill(new TextSkill());
|
|
|
|
SKContext result = await kernel.RunAsync(" i n f i n i t e s p a c e ",
|
|
text["TrimStart"],
|
|
text["TrimEnd"],
|
|
text["Uppercase"]);
|
|
|
|
Console.WriteLine(result);
|
|
}
|
|
}
|