mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 11:19:56 +00:00
### Motivation and Context Rename `Skills` to `Plugins`. First sub task from https://github.com/microsoft/semantic-kernel/issues/2119. ### Description This is the first PR 1. Move Core, Document, MsGraph and Web skill projects to a new `Plugins` folder 2. Update Core, Document, MsGraph and Web projects to use `Plugins` instead of `Skills` in assembly names, namespace, class names 3. Extract text from `Skills.UnitTests` and create new `Plugins.UnitTests` project Solution Explorer:  File Explorer:  ### Contribution Checklist - [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 - [ ] I didn't break anyone 😄
34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System;
|
|
using System.Globalization;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.Extensions.Logging;
|
|
using Microsoft.SemanticKernel;
|
|
using Microsoft.SemanticKernel.Orchestration;
|
|
using RepoUtils;
|
|
using Skills;
|
|
|
|
// ReSharper disable once InconsistentNaming
|
|
public static class Example03_Variables
|
|
{
|
|
private static readonly ILoggerFactory s_loggerFactory = ConsoleLogger.LoggerFactory;
|
|
|
|
public static async Task RunAsync()
|
|
{
|
|
Console.WriteLine("======== Variables ========");
|
|
|
|
IKernel kernel = new KernelBuilder().WithLoggerFactory(s_loggerFactory).Build();
|
|
var text = kernel.ImportSkill(new StaticTextPlugin(), "text");
|
|
|
|
var variables = new ContextVariables("Today is: ");
|
|
variables.Set("day", DateTimeOffset.Now.ToString("dddd", CultureInfo.CurrentCulture));
|
|
|
|
SKContext result = await kernel.RunAsync(variables,
|
|
text["AppendDay"],
|
|
text["Uppercase"]);
|
|
|
|
Console.WriteLine(result);
|
|
}
|
|
}
|