From c10f7c4e3a327140f42e78638fb513e95000a59a Mon Sep 17 00:00:00 2001 From: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Mon, 18 Sep 2023 19:58:36 +0100 Subject: [PATCH] .Net: Rename 'Skills' -> 'Plugins' - Part 1 (#2854) ### 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: ![image](https://github.com/microsoft/semantic-kernel/assets/127216156/16dd8146-d8a0-44e3-8995-894afb644e09) File Explorer: ![image](https://github.com/microsoft/semantic-kernel/assets/127216156/1aef0bd9-ac54-492f-8725-eac0d3e6db86) ### 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 :smile: --- dotnet/SK-dotnet.sln | 32 +++++++++++----- .../ApplicationInsightsExample.csproj | 6 +-- .../ApplicationInsightsExample/Program.cs | 14 +++---- .../Example01_NativeFunctions.cs | 4 +- .../Example02_Pipeline.cs | 4 +- .../Example03_Variables.cs | 2 +- ...xample04_CombineLLMPromptsAndNativeCode.cs | 6 +-- .../Example06_TemplateLanguage.cs | 4 +- .../Example07_BingAndGoogleSkills.cs | 12 +++--- .../Example08_RetryHandler.cs | 4 +- ...Example10_DescribeAllSkillsAndFunctions.cs | 6 +-- .../Example11_WebSearchQueries.cs | 4 +- .../Example12_SequentialPlanner.cs | 4 +- .../Example13_ConversationSummarySkill.cs | 14 +++---- .../Example15_TextMemorySkill.cs | 38 +++++++++---------- .../Example30_ChatWithPrompts.cs | 4 +- .../Example31_CustomPlanner.cs | 16 ++++---- .../Example48_GroundednessChecks.cs | 4 +- .../Example51_StepwisePlanner.cs | 14 +++---- ...ateNativeFunctionsWithMultipleArguments.cs | 4 +- .../KernelSyntaxExamples.csproj | 6 +-- .../Skills/StaticTextSkill.cs | 2 +- .../LanguageCalculatorPlugin.cs} | 12 +++--- .../NCalcPlugins.csproj} | 0 .../SimpleCalculatorPlugin.cs} | 10 ++--- .../Planning.ActionPlanner/ActionPlanner.cs | 4 +- .../IntegrationTests/IntegrationTests.csproj | 4 +- .../StepwisePlanner/StepwisePlannerTests.cs | 14 +++---- .../WebSkill/WebSkillTests.cs | 12 +++--- .../ConversationSummaryPlugin.cs} | 16 ++++---- .../Plugins.Core/FileIOPlugin.cs} | 6 +-- .../Plugins.Core/HttpPlugin.cs} | 16 ++++---- .../Plugins.Core/MathPlugin.cs} | 8 ++-- .../Plugins.Core/Plugins.Core.csproj} | 6 +-- .../SemanticFunctionConstants.cs | 2 +- .../Plugins.Core/TextMemoryPlugin.cs} | 26 ++++++------- .../Plugins.Core/TextPlugin.cs} | 8 ++-- .../Plugins.Core/TimePlugin.cs} | 8 ++-- .../Plugins.Core/WaitPlugin.cs} | 12 +++--- .../Plugins.Document/DocumentPlugin.cs} | 20 +++++----- .../FileSystem/IFileSystemConnector.cs | 2 +- .../FileSystem/LocalFileSystemConnector.cs | 2 +- .../Plugins.Document}/IDocumentConnector.cs | 2 +- .../Extensions/WordprocessingDocumentEx.cs | 2 +- .../OpenXml/WordDocumentConnector.cs | 4 +- .../Plugins.Document/Plugins.Document.csproj} | 6 +-- .../Plugins.MsGraph/CalendarPlugin.cs} | 14 +++---- .../Plugins.MsGraph/CloudDrivePlugin.cs} | 12 +++--- .../Client/MsGraphClientLoggingHandler.cs | 2 +- .../Connectors/Client/MsGraphConfiguration.cs | 2 +- .../LocalUserMSALCredentialManager.cs | 4 +- .../Connectors/Diagnostics/Ensure.cs | 2 +- .../MicrosoftGraphModelExtensions.cs | 4 +- .../Connectors/MicrosoftToDoConnector.cs | 6 +-- .../Connectors/OneDriveConnector.cs | 4 +- .../OrganizationHierarchyConnector.cs | 2 +- .../Connectors/OutlookCalendarConnector.cs | 4 +- .../Connectors/OutlookMailConnector.cs | 6 +-- .../Plugins.MsGraph}/Diagnostics/Ensure.cs | 2 +- .../Diagnostics/NullableAttributes.cs | 0 .../Plugins.MsGraph/EmailPlugin.cs} | 14 +++---- .../Plugins.MsGraph}/ICalendarConnector.cs | 4 +- .../Plugins.MsGraph}/ICloudDriveConnector.cs | 2 +- .../Plugins.MsGraph}/IEmailConnector.cs | 4 +- .../IOrganizationHierarchyConnector.cs | 2 +- .../ITaskManagementConnector.cs | 4 +- .../Plugins.MsGraph}/Models/CalendarEvent.cs | 2 +- .../Plugins.MsGraph}/Models/EmailAddress.cs | 2 +- .../Plugins.MsGraph}/Models/EmailMessage.cs | 2 +- .../Models/TaskManagementTask.cs | 2 +- .../Models/TaskManagementTaskList.cs | 2 +- .../OrganizationHierarchyPlugin.cs} | 10 ++--- .../Plugins.MsGraph/Plugins.MsGraph.csproj} | 6 +-- .../Plugins.MsGraph/TaskListPlugin.cs} | 14 +++---- .../Plugins/Plugins.UnitTests/.editorconfig | 6 +++ .../Core/FileIOPluginTests.cs} | 18 ++++----- .../Core/HttpPluginTests.cs} | 18 ++++----- .../Core/MathPluginTests.cs} | 22 +++++------ .../Core/TextPluginTests.cs} | 24 ++++++------ .../Core/TimePluginTests.cs} | 18 ++++----- .../Core/WaitPluginTests.cs} | 18 ++++----- .../Document/DocumentPluginTests.cs} | 16 ++++---- .../MsGraph/CalendarPluginTests.cs} | 22 +++++------ .../MsGraph/CloudDrivePluginTests.cs} | 12 +++--- .../MsGraph/EmailPluginTests.cs} | 14 +++---- .../OrganizationHierarchyPluginTests.cs} | 12 +++--- .../MsGraph/TaskListPluginTests.cs} | 16 ++++---- .../Plugins.UnitTests.csproj | 36 ++++++++++++++++++ .../Web/SearchUrlSkillTests.cs | 34 ++++++++--------- .../Web/WebSearchEngineSkillTests.cs | 8 ++-- .../Plugins.Web}/Bing/BingConnector.cs | 2 +- .../Plugins.Web}/Google/GoogleConnector.cs | 2 +- .../Plugins.Web}/IWebSearchEngineConnector.cs | 2 +- .../Plugins.Web/Plugins.Web.csproj} | 2 +- .../Plugins.Web/SearchUrlPlugin.cs} | 4 +- .../Plugins.Web/WebFileDownloadPlugin.cs} | 14 +++---- .../Plugins.Web/WebSearchEnginePlugin.cs} | 8 ++-- .../SemanticKernel.MetaPackage.csproj | 2 +- .../Skills.UnitTests/Skills.UnitTests.csproj | 4 -- .../apps/chat-summary-webapp-react/README.md | 4 +- .../chat-summary-webapp-react/src/App.tsx | 6 +-- 101 files changed, 467 insertions(+), 417 deletions(-) rename dotnet/samples/{NCalcSkills/LanguageCalculatorSkill.cs => NCalcPlugins/LanguageCalculatorPlugin.cs} (95%) rename dotnet/samples/{NCalcSkills/NCalcSkills.csproj => NCalcPlugins/NCalcPlugins.csproj} (100%) rename dotnet/samples/{NCalcSkills/SimpleCalculatorSkill.cs => NCalcPlugins/SimpleCalculatorPlugin.cs} (86%) rename dotnet/src/{Skills/Skills.Core/ConversationSummarySkill.cs => Plugins/Plugins.Core/ConversationSummaryPlugin.cs} (91%) rename dotnet/src/{Skills/Skills.Core/FileIOSkill.cs => Plugins/Plugins.Core/FileIOPlugin.cs} (92%) rename dotnet/src/{Skills/Skills.Core/HttpSkill.cs => Plugins/Plugins.Core/HttpPlugin.cs} (89%) rename dotnet/src/{Skills/Skills.Core/MathSkill.cs => Plugins/Plugins.Core/MathPlugin.cs} (87%) rename dotnet/src/{Skills/Skills.Core/Skills.Core.csproj => Plugins/Plugins.Core/Plugins.Core.csproj} (76%) rename dotnet/src/{Skills/Skills.Core => Plugins/Plugins.Core}/SemanticFunctionConstants.cs (98%) rename dotnet/src/{Skills/Skills.Core/TextMemorySkill.cs => Plugins/Plugins.Core/TextMemoryPlugin.cs} (89%) rename dotnet/src/{Skills/Skills.Core/TextSkill.cs => Plugins/Plugins.Core/TextPlugin.cs} (96%) rename dotnet/src/{Skills/Skills.Core/TimeSkill.cs => Plugins/Plugins.Core/TimePlugin.cs} (97%) rename dotnet/src/{Skills/Skills.Core/WaitSkill.cs => Plugins/Plugins.Core/WaitPlugin.cs} (83%) rename dotnet/src/{Skills/Skills.Document/DocumentSkill.cs => Plugins/Plugins.Document/DocumentPlugin.cs} (85%) rename dotnet/src/{Skills/Skills.Document => Plugins/Plugins.Document}/FileSystem/IFileSystemConnector.cs (96%) rename dotnet/src/{Skills/Skills.Document => Plugins/Plugins.Document}/FileSystem/LocalFileSystemConnector.cs (98%) rename dotnet/src/{Skills/Skills.Document => Plugins/Plugins.Document}/IDocumentConnector.cs (94%) rename dotnet/src/{Skills/Skills.Document => Plugins/Plugins.Document}/OpenXml/Extensions/WordprocessingDocumentEx.cs (97%) rename dotnet/src/{Skills/Skills.Document => Plugins/Plugins.Document}/OpenXml/WordDocumentConnector.cs (95%) rename dotnet/src/{Skills/Skills.Document/Skills.Document.csproj => Plugins/Plugins.Document/Plugins.Document.csproj} (72%) rename dotnet/src/{Skills/Skills.MsGraph/CalendarSkill.cs => Plugins/Plugins.MsGraph/CalendarPlugin.cs} (91%) rename dotnet/src/{Skills/Skills.MsGraph/CloudDriveSkill.cs => Plugins/Plugins.MsGraph/CloudDrivePlugin.cs} (91%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Connectors/Client/MsGraphClientLoggingHandler.cs (97%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Connectors/Client/MsGraphConfiguration.cs (95%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Connectors/CredentialManagers/LocalUserMSALCredentialManager.cs (97%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Connectors/Diagnostics/Ensure.cs (95%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Connectors/MicrosoftGraphModelExtensions.cs (96%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Connectors/MicrosoftToDoConnector.cs (96%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Connectors/OneDriveConnector.cs (97%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Connectors/OrganizationHierarchyConnector.cs (97%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Connectors/OutlookCalendarConnector.cs (94%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Connectors/OutlookMailConnector.cs (93%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Diagnostics/Ensure.cs (93%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Diagnostics/NullableAttributes.cs (100%) rename dotnet/src/{Skills/Skills.MsGraph/EmailSkill.cs => Plugins/Plugins.MsGraph/EmailPlugin.cs} (91%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/ICalendarConnector.cs (93%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/ICloudDriveConnector.cs (97%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/IEmailConnector.cs (94%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/IOrganizationHierarchyConnector.cs (96%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/ITaskManagementConnector.cs (96%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Models/CalendarEvent.cs (94%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Models/EmailAddress.cs (86%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Models/EmailMessage.cs (95%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Models/TaskManagementTask.cs (96%) rename dotnet/src/{Skills/Skills.MsGraph => Plugins/Plugins.MsGraph}/Models/TaskManagementTaskList.cs (92%) rename dotnet/src/{Skills/Skills.MsGraph/OrganizationHierarchySkill.cs => Plugins/Plugins.MsGraph/OrganizationHierarchyPlugin.cs} (90%) rename dotnet/src/{Skills/Skills.MsGraph/Skills.MsGraph.csproj => Plugins/Plugins.MsGraph/Plugins.MsGraph.csproj} (73%) rename dotnet/src/{Skills/Skills.MsGraph/TaskListSkill.cs => Plugins/Plugins.MsGraph/TaskListPlugin.cs} (90%) create mode 100644 dotnet/src/Plugins/Plugins.UnitTests/.editorconfig rename dotnet/src/{Skills/Skills.UnitTests/Core/FileIOSkillTests.cs => Plugins/Plugins.UnitTests/Core/FileIOPluginTests.cs} (82%) rename dotnet/src/{Skills/Skills.UnitTests/Core/HttpSkillTests.cs => Plugins/Plugins.UnitTests/Core/HttpPluginTests.cs} (90%) rename dotnet/src/{Skills/Skills.UnitTests/Core/MathSkillTests.cs => Plugins/Plugins.UnitTests/Core/MathPluginTests.cs} (91%) rename dotnet/src/{Skills/Skills.UnitTests/Core/TextSkillTests.cs => Plugins/Plugins.UnitTests/Core/TextPluginTests.cs} (83%) rename dotnet/src/{Skills/Skills.UnitTests/Core/TimeSkillTests.cs => Plugins/Plugins.UnitTests/Core/TimePluginTests.cs} (87%) rename dotnet/src/{Skills/Skills.UnitTests/Core/WaitSkillTests.cs => Plugins/Plugins.UnitTests/Core/WaitPluginTests.cs} (80%) rename dotnet/src/{Skills/Skills.UnitTests/Document/DocumentSkillTests.cs => Plugins/Plugins.UnitTests/Document/DocumentPluginTests.cs} (87%) rename dotnet/src/{Skills/Skills.UnitTests/MsGraph/CalendarSkillTests.cs => Plugins/Plugins.UnitTests/MsGraph/CalendarPluginTests.cs} (93%) rename dotnet/src/{Skills/Skills.UnitTests/MsGraph/CloudDriveSkillTests.cs => Plugins/Plugins.UnitTests/MsGraph/CloudDrivePluginTests.cs} (86%) rename dotnet/src/{Skills/Skills.UnitTests/MsGraph/EmailSkillTests.cs => Plugins/Plugins.UnitTests/MsGraph/EmailPluginTests.cs} (86%) rename dotnet/src/{Skills/Skills.UnitTests/MsGraph/OrganizationHierarchySkillTests.cs => Plugins/Plugins.UnitTests/MsGraph/OrganizationHierarchyPluginTests.cs} (85%) rename dotnet/src/{Skills/Skills.UnitTests/MsGraph/TaskListSkillTests.cs => Plugins/Plugins.UnitTests/MsGraph/TaskListPluginTests.cs} (89%) create mode 100644 dotnet/src/Plugins/Plugins.UnitTests/Plugins.UnitTests.csproj rename dotnet/src/{Skills/Skills.UnitTests => Plugins/Plugins.UnitTests}/Web/SearchUrlSkillTests.cs (83%) rename dotnet/src/{Skills/Skills.UnitTests => Plugins/Plugins.UnitTests}/Web/WebSearchEngineSkillTests.cs (78%) rename dotnet/src/{Skills/Skills.Web => Plugins/Plugins.Web}/Bing/BingConnector.cs (99%) rename dotnet/src/{Skills/Skills.Web => Plugins/Plugins.Web}/Google/GoogleConnector.cs (98%) rename dotnet/src/{Skills/Skills.Web => Plugins/Plugins.Web}/IWebSearchEngineConnector.cs (94%) rename dotnet/src/{Skills/Skills.Web/Skills.Web.csproj => Plugins/Plugins.Web/Plugins.Web.csproj} (93%) rename dotnet/src/{Skills/Skills.Web/SearchUrlSkill.cs => Plugins/Plugins.Web/SearchUrlPlugin.cs} (98%) rename dotnet/src/{Skills/Skills.Web/WebFileDownloadSkill.cs => Plugins/Plugins.Web/WebFileDownloadPlugin.cs} (89%) rename dotnet/src/{Skills/Skills.Web/WebSearchEngineSkill.cs => Plugins/Plugins.Web/WebSearchEnginePlugin.cs} (92%) diff --git a/dotnet/SK-dotnet.sln b/dotnet/SK-dotnet.sln index cc503ee434f5..506d599a9057 100644 --- a/dotnet/SK-dotnet.sln +++ b/dotnet/SK-dotnet.sln @@ -21,11 +21,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KernelHttpServer", "..\samp EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests", "src\IntegrationTests\IntegrationTests.csproj", "{E4B777A1-28E1-41BE-96AE-7F3EC61FD5D4}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skills.Document", "src\Skills\Skills.Document\Skills.Document.csproj", "{F94D1938-9DB7-4B24-9FF3-166DDFD96330}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugins.Document", "src\Plugins\Plugins.Document\Plugins.Document.csproj", "{F94D1938-9DB7-4B24-9FF3-166DDFD96330}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skills.MsGraph", "src\Skills\Skills.MsGraph\Skills.MsGraph.csproj", "{689A5041-BAE7-448F-9BDC-4672E96249AA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugins.MsGraph", "src\Plugins\Plugins.MsGraph\Plugins.MsGraph.csproj", "{689A5041-BAE7-448F-9BDC-4672E96249AA}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skills.Web", "src\Skills\Skills.Web\Skills.Web.csproj", "{EEA87FBC-4ED5-458C-ABD3-BEAEEB535BAF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugins.Web", "src\Plugins\Plugins.Web\Plugins.Web.csproj", "{EEA87FBC-4ED5-458C-ABD3-BEAEEB535BAF}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{158A4E5E-AEE0-4D60-83C7-8E089B2D881D}" ProjectSection(SolutionItems) = preProject @@ -140,9 +140,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "System", "System", "{3CDE10 src\InternalUtilities\src\System\EnvExtensions.cs = src\InternalUtilities\src\System\EnvExtensions.cs EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skills.Core", "src\Skills\Skills.Core\Skills.Core.csproj", "{0D0C4DAD-E6BC-4504-AE3A-EEA4E35920C1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugins.Core", "src\Plugins\Plugins.Core\Plugins.Core.csproj", "{0D0C4DAD-E6BC-4504-AE3A-EEA4E35920C1}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NCalcSkills", "samples\NCalcSkills\NCalcSkills.csproj", "{E6EDAB8F-3406-4DBF-9AAB-DF40DC2CA0FA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NCalcPlugins", "samples\NCalcPlugins\NCalcPlugins.csproj", "{E6EDAB8F-3406-4DBF-9AAB-DF40DC2CA0FA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connectors.AI.Oobabooga", "src\Connectors\Connectors.AI.Oobabooga\Connectors.AI.Oobabooga.csproj", "{677F1381-7830-4115-9C1A-58B282629DC6}" EndProject @@ -160,6 +160,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Reliability.Basic", "src\Ex EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Extensions.StepwisePlanner.UnitTests", "src\Extensions\Extensions.StepwisePlanner.UnitTests\Extensions.StepwisePlanner.UnitTests.csproj", "{6F651E87-F16E-407B-AF7F-B3475F850E9A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugins", "plugins", "{D6D598DF-C17C-46F4-B2B9-CDE82E2DE132}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugins.UnitTests", "src\Plugins\Plugins.UnitTests\Plugins.UnitTests.csproj", "{5CB78CE4-895B-4A14-98AA-716A37DEEBB1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -401,6 +405,12 @@ Global {6F651E87-F16E-407B-AF7F-B3475F850E9A}.Publish|Any CPU.Build.0 = Debug|Any CPU {6F651E87-F16E-407B-AF7F-B3475F850E9A}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F651E87-F16E-407B-AF7F-B3475F850E9A}.Release|Any CPU.Build.0 = Release|Any CPU + {5CB78CE4-895B-4A14-98AA-716A37DEEBB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5CB78CE4-895B-4A14-98AA-716A37DEEBB1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5CB78CE4-895B-4A14-98AA-716A37DEEBB1}.Publish|Any CPU.ActiveCfg = Debug|Any CPU + {5CB78CE4-895B-4A14-98AA-716A37DEEBB1}.Publish|Any CPU.Build.0 = Debug|Any CPU + {5CB78CE4-895B-4A14-98AA-716A37DEEBB1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5CB78CE4-895B-4A14-98AA-716A37DEEBB1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -411,9 +421,9 @@ Global {3EB61E99-C39B-4620-9482-F8DA18E48525} = {FA3720F1-C99A-49B2-9577-A940257098BF} {34A7F1EF-D243-4160-A413-D713FEABCD94} = {FA3720F1-C99A-49B2-9577-A940257098BF} {E4B777A1-28E1-41BE-96AE-7F3EC61FD5D4} = {831DDCA2-7D2C-4C31-80DB-6BDB3E1F7AE0} - {F94D1938-9DB7-4B24-9FF3-166DDFD96330} = {9ECD1AA0-75B3-4E25-B0B5-9F0945B64974} - {689A5041-BAE7-448F-9BDC-4672E96249AA} = {9ECD1AA0-75B3-4E25-B0B5-9F0945B64974} - {EEA87FBC-4ED5-458C-ABD3-BEAEEB535BAF} = {9ECD1AA0-75B3-4E25-B0B5-9F0945B64974} + {F94D1938-9DB7-4B24-9FF3-166DDFD96330} = {D6D598DF-C17C-46F4-B2B9-CDE82E2DE132} + {689A5041-BAE7-448F-9BDC-4672E96249AA} = {D6D598DF-C17C-46F4-B2B9-CDE82E2DE132} + {EEA87FBC-4ED5-458C-ABD3-BEAEEB535BAF} = {D6D598DF-C17C-46F4-B2B9-CDE82E2DE132} {37E39C68-5A40-4E63-9D3C-0C66AD98DFCB} = {831DDCA2-7D2C-4C31-80DB-6BDB3E1F7AE0} {9ECD1AA0-75B3-4E25-B0B5-9F0945B64974} = {831DDCA2-7D2C-4C31-80DB-6BDB3E1F7AE0} {107156B4-5A8B-45C7-97A2-4544D7FA19DE} = {9ECD1AA0-75B3-4E25-B0B5-9F0945B64974} @@ -448,7 +458,7 @@ Global {DB950192-30F1-48B1-88D7-F43FECCA1A1C} = {958AD708-F048-4FAF-94ED-D2F2B92748B9} {1C19D805-3573-4477-BF07-40180FCDE1BD} = {958AD708-F048-4FAF-94ED-D2F2B92748B9} {3CDE10B2-AE8F-4FC4-8D55-92D4AD32E144} = {958AD708-F048-4FAF-94ED-D2F2B92748B9} - {0D0C4DAD-E6BC-4504-AE3A-EEA4E35920C1} = {9ECD1AA0-75B3-4E25-B0B5-9F0945B64974} + {0D0C4DAD-E6BC-4504-AE3A-EEA4E35920C1} = {D6D598DF-C17C-46F4-B2B9-CDE82E2DE132} {E6EDAB8F-3406-4DBF-9AAB-DF40DC2CA0FA} = {FA3720F1-C99A-49B2-9577-A940257098BF} {677F1381-7830-4115-9C1A-58B282629DC6} = {0247C2C9-86C3-45BA-8873-28B0948EDC0C} {4762BCAF-E1C5-4714-B88D-E50FA333C50E} = {078F96B4-09E1-4E0E-B214-F71A4F4BF633} @@ -458,8 +468,10 @@ Global {D4540A0F-98E3-4E70-9093-1948AE5B2AAD} = {078F96B4-09E1-4E0E-B214-F71A4F4BF633} {3DC4DBD8-20A5-4937-B4F5-BB5E24E7A567} = {078F96B4-09E1-4E0E-B214-F71A4F4BF633} {6F651E87-F16E-407B-AF7F-B3475F850E9A} = {078F96B4-09E1-4E0E-B214-F71A4F4BF633} + {D6D598DF-C17C-46F4-B2B9-CDE82E2DE132} = {831DDCA2-7D2C-4C31-80DB-6BDB3E1F7AE0} + {5CB78CE4-895B-4A14-98AA-716A37DEEBB1} = {D6D598DF-C17C-46F4-B2B9-CDE82E2DE132} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {FBDC56A3-86AD-4323-AA0F-201E59123B83} EndGlobalSection -EndGlobal \ No newline at end of file +EndGlobal diff --git a/dotnet/samples/ApplicationInsightsExample/ApplicationInsightsExample.csproj b/dotnet/samples/ApplicationInsightsExample/ApplicationInsightsExample.csproj index a2c0e483079c..cdef58d8faa8 100644 --- a/dotnet/samples/ApplicationInsightsExample/ApplicationInsightsExample.csproj +++ b/dotnet/samples/ApplicationInsightsExample/ApplicationInsightsExample.csproj @@ -25,9 +25,9 @@ - - - + + + diff --git a/dotnet/samples/ApplicationInsightsExample/Program.cs b/dotnet/samples/ApplicationInsightsExample/Program.cs index c6f3503f72b4..5c1787e58569 100644 --- a/dotnet/samples/ApplicationInsightsExample/Program.cs +++ b/dotnet/samples/ApplicationInsightsExample/Program.cs @@ -16,10 +16,10 @@ using Microsoft.SemanticKernel.Planning.Action; using Microsoft.SemanticKernel.Planning.Sequential; using Microsoft.SemanticKernel.Planning.Stepwise; -using Microsoft.SemanticKernel.Skills.Core; -using Microsoft.SemanticKernel.Skills.Web; -using Microsoft.SemanticKernel.Skills.Web.Bing; -using NCalcSkills; +using Microsoft.SemanticKernel.Plugins.Core; +using Microsoft.SemanticKernel.Plugins.Web; +using Microsoft.SemanticKernel.Plugins.Web.Bing; +using NCalcPlugins; /// /// Example of telemetry in Semantic Kernel using Application Insights within console application. @@ -110,7 +110,7 @@ private static IKernel GetKernel(ILoggerFactory loggerFactory) { var folder = RepoFiles.SampleSkillsPath(); var bingConnector = new BingConnector(Env.Var("Bing__ApiKey")); - var webSearchEngineSkill = new WebSearchEngineSkill(bingConnector); + var webSearchEngineSkill = new WebSearchEnginePlugin(bingConnector); var kernel = new KernelBuilder() .WithLoggerFactory(loggerFactory) @@ -123,8 +123,8 @@ private static IKernel GetKernel(ILoggerFactory loggerFactory) kernel.ImportSemanticSkillFromDirectory(folder, "SummarizeSkill", "WriterSkill"); kernel.ImportSkill(webSearchEngineSkill, "WebSearch"); - kernel.ImportSkill(new LanguageCalculatorSkill(kernel), "advancedCalculator"); - kernel.ImportSkill(new TimeSkill(), "time"); + kernel.ImportSkill(new LanguageCalculatorPlugin(kernel), "advancedCalculator"); + kernel.ImportSkill(new TimePlugin(), "time"); return kernel; } diff --git a/dotnet/samples/KernelSyntaxExamples/Example01_NativeFunctions.cs b/dotnet/samples/KernelSyntaxExamples/Example01_NativeFunctions.cs index 6c68f07d41f7..48e5efcad826 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example01_NativeFunctions.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example01_NativeFunctions.cs @@ -2,7 +2,7 @@ using System; using System.Threading.Tasks; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; // ReSharper disable once InconsistentNaming public static class Example01_NativeFunctions @@ -12,7 +12,7 @@ public static Task RunAsync() Console.WriteLine("======== Functions ========"); // Load native skill - var text = new TextSkill(); + var text = new TextPlugin(); // Use function without kernel var result = text.Uppercase("ciao!"); diff --git a/dotnet/samples/KernelSyntaxExamples/Example02_Pipeline.cs b/dotnet/samples/KernelSyntaxExamples/Example02_Pipeline.cs index 99e25470250c..7d5c3bc2310f 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example02_Pipeline.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example02_Pipeline.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.Logging; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Orchestration; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using RepoUtils; // ReSharper disable once InconsistentNaming @@ -20,7 +20,7 @@ public static async Task RunAsync() IKernel kernel = new KernelBuilder().WithLoggerFactory(s_loggerFactory).Build(); // Load native skill - var text = kernel.ImportSkill(new TextSkill()); + var text = kernel.ImportSkill(new TextPlugin()); SKContext result = await kernel.RunAsync(" i n f i n i t e s p a c e ", text["TrimStart"], diff --git a/dotnet/samples/KernelSyntaxExamples/Example03_Variables.cs b/dotnet/samples/KernelSyntaxExamples/Example03_Variables.cs index e69381202cf7..38e9bbd853be 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example03_Variables.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example03_Variables.cs @@ -19,7 +19,7 @@ public static async Task RunAsync() Console.WriteLine("======== Variables ========"); IKernel kernel = new KernelBuilder().WithLoggerFactory(s_loggerFactory).Build(); - var text = kernel.ImportSkill(new StaticTextSkill(), "text"); + var text = kernel.ImportSkill(new StaticTextPlugin(), "text"); var variables = new ContextVariables("Today is: "); variables.Set("day", DateTimeOffset.Now.ToString("dddd", CultureInfo.CurrentCulture)); diff --git a/dotnet/samples/KernelSyntaxExamples/Example04_CombineLLMPromptsAndNativeCode.cs b/dotnet/samples/KernelSyntaxExamples/Example04_CombineLLMPromptsAndNativeCode.cs index a22f134b7733..8a4d405ac25c 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example04_CombineLLMPromptsAndNativeCode.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example04_CombineLLMPromptsAndNativeCode.cs @@ -3,8 +3,8 @@ using System; using System.Threading.Tasks; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Web; -using Microsoft.SemanticKernel.Skills.Web.Bing; +using Microsoft.SemanticKernel.Plugins.Web; +using Microsoft.SemanticKernel.Plugins.Web.Bing; using RepoUtils; // ReSharper disable once InconsistentNaming @@ -37,7 +37,7 @@ public static async Task RunAsync() } var bingConnector = new BingConnector(bingApiKey); - var bing = new WebSearchEngineSkill(bingConnector); + var bing = new WebSearchEnginePlugin(bingConnector); var search = kernel.ImportSkill(bing, "bing"); // Load semantic skill defined with prompt templates diff --git a/dotnet/samples/KernelSyntaxExamples/Example06_TemplateLanguage.cs b/dotnet/samples/KernelSyntaxExamples/Example06_TemplateLanguage.cs index fa0c246f4b03..e4c91d0baecd 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example06_TemplateLanguage.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example06_TemplateLanguage.cs @@ -3,7 +3,7 @@ using System; using System.Threading.Tasks; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using Microsoft.SemanticKernel.TemplateEngine.Prompt; using RepoUtils; @@ -36,7 +36,7 @@ public static async Task RunAsync() // Load native skill into the kernel skill collection, sharing its functions with prompt templates // Functions loaded here are available as "time.*" - kernel.ImportSkill(new TimeSkill(), "time"); + kernel.ImportSkill(new TimePlugin(), "time"); // Semantic Function invoking time.Date and time.Time native functions const string FunctionDefinition = @" diff --git a/dotnet/samples/KernelSyntaxExamples/Example07_BingAndGoogleSkills.cs b/dotnet/samples/KernelSyntaxExamples/Example07_BingAndGoogleSkills.cs index 6bcb6cf08d19..322e9bf65677 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example07_BingAndGoogleSkills.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example07_BingAndGoogleSkills.cs @@ -3,9 +3,9 @@ using System; using System.Threading.Tasks; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Web; -using Microsoft.SemanticKernel.Skills.Web.Bing; -using Microsoft.SemanticKernel.Skills.Web.Google; +using Microsoft.SemanticKernel.Plugins.Web; +using Microsoft.SemanticKernel.Plugins.Web.Bing; +using Microsoft.SemanticKernel.Plugins.Web.Google; using Microsoft.SemanticKernel.TemplateEngine.Prompt; using RepoUtils; @@ -46,7 +46,7 @@ public static async Task RunAsync() else { var bingConnector = new BingConnector(bingApiKey); - var bing = new WebSearchEngineSkill(bingConnector); + var bing = new WebSearchEnginePlugin(bingConnector); var search = kernel.ImportSkill(bing, "bing"); await Example1Async(kernel, "bing"); await Example2Async(kernel); @@ -65,8 +65,8 @@ public static async Task RunAsync() using var googleConnector = new GoogleConnector( apiKey: googleApiKey, searchEngineId: googleSearchEngineId); - var google = new WebSearchEngineSkill(googleConnector); - var search = kernel.ImportSkill(new WebSearchEngineSkill(googleConnector), "google"); + var google = new WebSearchEnginePlugin(googleConnector); + var search = kernel.ImportSkill(new WebSearchEnginePlugin(googleConnector), "google"); await Example1Async(kernel, "google"); } } diff --git a/dotnet/samples/KernelSyntaxExamples/Example08_RetryHandler.cs b/dotnet/samples/KernelSyntaxExamples/Example08_RetryHandler.cs index 2e86f64fa862..3b6b6ed31a67 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example08_RetryHandler.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example08_RetryHandler.cs @@ -8,8 +8,8 @@ using Microsoft.Extensions.Logging; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Http; +using Microsoft.SemanticKernel.Plugins.Core; using Microsoft.SemanticKernel.Reliability.Basic; -using Microsoft.SemanticKernel.Skills.Core; using Polly; using RepoUtils; @@ -110,7 +110,7 @@ private static async Task ImportAndExecuteSkillAsync(IKernel kernel) // Load semantic skill defined with prompt templates string folder = RepoFiles.SampleSkillsPath(); - kernel.ImportSkill(new TimeSkill(), "time"); + kernel.ImportSkill(new TimePlugin(), "time"); var qaSkill = kernel.ImportSemanticSkillFromDirectory( folder, diff --git a/dotnet/samples/KernelSyntaxExamples/Example10_DescribeAllSkillsAndFunctions.cs b/dotnet/samples/KernelSyntaxExamples/Example10_DescribeAllSkillsAndFunctions.cs index 1106e7126466..94af6ea4d6cf 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example10_DescribeAllSkillsAndFunctions.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example10_DescribeAllSkillsAndFunctions.cs @@ -5,8 +5,8 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.SemanticKernel; +using Microsoft.SemanticKernel.Plugins.Core; using Microsoft.SemanticKernel.SkillDefinition; -using Microsoft.SemanticKernel.Skills.Core; using RepoUtils; using Skills; @@ -29,11 +29,11 @@ public static Task RunAsync() .Build(); // Import a native skill - var skill1 = new StaticTextSkill(); + var skill1 = new StaticTextPlugin(); kernel.ImportSkill(skill1, "StaticTextskill"); // Import another native skill - var skill2 = new TextSkill(); + var skill2 = new TextPlugin(); kernel.ImportSkill(skill2, "AnotherTextskill"); // Import a semantic skill diff --git a/dotnet/samples/KernelSyntaxExamples/Example11_WebSearchQueries.cs b/dotnet/samples/KernelSyntaxExamples/Example11_WebSearchQueries.cs index 4833fcf8ec36..be08651794c1 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example11_WebSearchQueries.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example11_WebSearchQueries.cs @@ -3,7 +3,7 @@ using System; using System.Threading.Tasks; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Web; +using Microsoft.SemanticKernel.Plugins.Web; using RepoUtils; // ReSharper disable once InconsistentNaming @@ -16,7 +16,7 @@ public static async Task RunAsync() IKernel kernel = Kernel.Builder.WithLoggerFactory(ConsoleLogger.LoggerFactory).Build(); // Load native skills - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); var bing = kernel.ImportSkill(skill, "search"); // Run diff --git a/dotnet/samples/KernelSyntaxExamples/Example12_SequentialPlanner.cs b/dotnet/samples/KernelSyntaxExamples/Example12_SequentialPlanner.cs index b5350c5c8a1b..8c4abb83185b 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example12_SequentialPlanner.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example12_SequentialPlanner.cs @@ -243,8 +243,8 @@ private static async Task MemorySampleAsync() "QASkill"); kernel.ImportSkill(new EmailSkill(), "email"); - kernel.ImportSkill(new StaticTextSkill(), "statictext"); - kernel.ImportSkill(new Microsoft.SemanticKernel.Skills.Core.TextSkill(), "coretext"); + kernel.ImportSkill(new StaticTextPlugin(), "statictext"); + kernel.ImportSkill(new Microsoft.SemanticKernel.Plugins.Core.TextPlugin(), "coretext"); var goal = "Create a book with 3 chapters about a group of kids in a club called 'The Thinking Caps.'"; diff --git a/dotnet/samples/KernelSyntaxExamples/Example13_ConversationSummarySkill.cs b/dotnet/samples/KernelSyntaxExamples/Example13_ConversationSummarySkill.cs index dff91754e1d6..abfb961320ef 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example13_ConversationSummarySkill.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example13_ConversationSummarySkill.cs @@ -5,13 +5,13 @@ using System.Threading.Tasks; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Orchestration; +using Microsoft.SemanticKernel.Plugins.Core; using Microsoft.SemanticKernel.SkillDefinition; -using Microsoft.SemanticKernel.Skills.Core; using RepoUtils; // ReSharper disable once InconsistentNaming -internal static class Example13_ConversationSummarySkill +internal static class Example13_ConversationSummaryPlugin { private const string ChatTranscript = @" @@ -123,18 +123,18 @@ internal static class Example13_ConversationSummarySkill public static async Task RunAsync() { - await ConversationSummarySkillAsync(); + await ConversationSummaryPluginAsync(); await GetConversationActionItemsAsync(); await GetConversationTopicsAsync(); } - private static async Task ConversationSummarySkillAsync() + private static async Task ConversationSummaryPluginAsync() { Console.WriteLine("======== SampleSkills - Conversation Summary Skill - Summarize ========"); IKernel kernel = InitializeKernel(); IDictionary conversationSummarySkill = - kernel.ImportSkill(new ConversationSummarySkill(kernel)); + kernel.ImportSkill(new ConversationSummaryPlugin(kernel)); SKContext summary = await kernel.RunAsync( ChatTranscript, @@ -150,7 +150,7 @@ private static async Task GetConversationActionItemsAsync() IKernel kernel = InitializeKernel(); IDictionary conversationSummarySkill = - kernel.ImportSkill(new ConversationSummarySkill(kernel)); + kernel.ImportSkill(new ConversationSummaryPlugin(kernel)); SKContext summary = await kernel.RunAsync( ChatTranscript, @@ -166,7 +166,7 @@ private static async Task GetConversationTopicsAsync() IKernel kernel = InitializeKernel(); IDictionary conversationSummarySkill = - kernel.ImportSkill(new ConversationSummarySkill(kernel)); + kernel.ImportSkill(new ConversationSummaryPlugin(kernel)); SKContext summary = await kernel.RunAsync( ChatTranscript, diff --git a/dotnet/samples/KernelSyntaxExamples/Example15_TextMemorySkill.cs b/dotnet/samples/KernelSyntaxExamples/Example15_TextMemorySkill.cs index c5f3f64ec51c..1f04ca911a53 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example15_TextMemorySkill.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example15_TextMemorySkill.cs @@ -16,14 +16,14 @@ using Microsoft.SemanticKernel.Connectors.Memory.Sqlite; using Microsoft.SemanticKernel.Connectors.Memory.Weaviate; using Microsoft.SemanticKernel.Memory; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using Npgsql; using Pgvector.Npgsql; using RepoUtils; using StackExchange.Redis; // ReSharper disable once InconsistentNaming -public static class Example15_TextMemorySkill +public static class Example15_TextMemoryPlugin { private const string MemoryCollectionName = "aboutMe"; @@ -179,32 +179,32 @@ private static async Task RunWithStoreAsync(IMemoryStore memoryStore, Cancellati Console.WriteLine(); ///////////////////////////////////////////////////////////////////////////////////////////////////// - // PART 2: Create TextMemorySkill, store and retrieve memories through the Kernel. + // PART 2: Create TextMemoryPlugin, store and retrieve memories through the Kernel. // // This enables semantic functions and the AI (via Planners) to access memories ///////////////////////////////////////////////////////////////////////////////////////////////////// - Console.WriteLine("== PART 2a: Saving Memories through the Kernel with TextMemorySkill and the 'Save' function =="); + Console.WriteLine("== PART 2a: Saving Memories through the Kernel with TextMemoryPlugin and the 'Save' function =="); - // Import the TextMemorySkill into the Kernel for other functions - var memorySkill = new TextMemorySkill(textMemory); + // Import the TextMemoryPlugin into the Kernel for other functions + var memorySkill = new TextMemoryPlugin(textMemory); var memoryFunctions = kernel.ImportSkill(memorySkill); // Save a memory with the Kernel Console.WriteLine("Saving memory with key 'info5': \"My family is from New York\""); await kernel.RunAsync(memoryFunctions["Save"], new() { - [TextMemorySkill.CollectionParam] = MemoryCollectionName, - [TextMemorySkill.KeyParam] = "info5", + [TextMemoryPlugin.CollectionParam] = MemoryCollectionName, + [TextMemoryPlugin.KeyParam] = "info5", ["input"] = "My family is from New York" }, cancellationToken); // Retrieve a specific memory with the Kernel - Console.WriteLine("== PART 2b: Retrieving Memories through the Kernel with TextMemorySkill and the 'Retrieve' function =="); + Console.WriteLine("== PART 2b: Retrieving Memories through the Kernel with TextMemoryPlugin and the 'Retrieve' function =="); var result = await kernel.RunAsync(memoryFunctions["Retrieve"], new() { - [TextMemorySkill.CollectionParam] = MemoryCollectionName, - [TextMemorySkill.KeyParam] = "info5" + [TextMemoryPlugin.CollectionParam] = MemoryCollectionName, + [TextMemoryPlugin.KeyParam] = "info5" }, cancellationToken); Console.WriteLine("Memory with key 'info5':" + result?.ToString() ?? "ERROR: memory not found"); @@ -232,14 +232,14 @@ private static async Task RunWithStoreAsync(IMemoryStore memoryStore, Cancellati Console.WriteLine($"Answer: {answer.Metadata.Text}"); } - Console.WriteLine("== PART 3b: Recall (similarity search) with Kernel and TextMemorySkill 'Recall' function =="); + Console.WriteLine("== PART 3b: Recall (similarity search) with Kernel and TextMemoryPlugin 'Recall' function =="); Console.WriteLine("Ask: where do I live?"); result = await kernel.RunAsync(memoryFunctions["Recall"], new() { - [TextMemorySkill.CollectionParam] = MemoryCollectionName, - [TextMemorySkill.LimitParam] = "2", - [TextMemorySkill.RelevanceParam] = "0.79", + [TextMemoryPlugin.CollectionParam] = MemoryCollectionName, + [TextMemoryPlugin.LimitParam] = "2", + [TextMemoryPlugin.RelevanceParam] = "0.79", ["input"] = "Ask: where do I live?" }, cancellationToken); @@ -259,13 +259,13 @@ private static async Task RunWithStoreAsync(IMemoryStore memoryStore, Cancellati */ ///////////////////////////////////////////////////////////////////////////////////////////////////// - // PART 3: TextMemorySkill Recall in a Semantic Function + // PART 3: TextMemoryPlugin Recall in a Semantic Function // // Looks up related memories when rendering a prompt template, then sends the rendered prompt to // the text completion model to answer a natural language query. ///////////////////////////////////////////////////////////////////////////////////////////////////// - Console.WriteLine("== PART 4: Using TextMemorySkill 'Recall' function in a Semantic Function =="); + Console.WriteLine("== PART 4: Using TextMemoryPlugin 'Recall' function in a Semantic Function =="); // Build a semantic function that uses memory to find facts const string RecallFunctionDefinition = @" @@ -285,8 +285,8 @@ END FACTS result = await kernel.RunAsync(aboutMeOracle, new() { - [TextMemorySkill.CollectionParam] = MemoryCollectionName, - [TextMemorySkill.RelevanceParam] = "0.79", + [TextMemoryPlugin.CollectionParam] = MemoryCollectionName, + [TextMemoryPlugin.RelevanceParam] = "0.79", ["input"] = "Do I live in the same town where I grew up?" }, cancellationToken); diff --git a/dotnet/samples/KernelSyntaxExamples/Example30_ChatWithPrompts.cs b/dotnet/samples/KernelSyntaxExamples/Example30_ChatWithPrompts.cs index 2df80819f364..fc4252f7604c 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example30_ChatWithPrompts.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example30_ChatWithPrompts.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.AI.ChatCompletion; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using Microsoft.SemanticKernel.TemplateEngine.Prompt; using RepoUtils; using Resources; @@ -69,7 +69,7 @@ public static async Task RunAsync() // As an example, we import the time skill, which is used in system prompt to read the current date. // We could also use a variable, this is just to show that the prompt can invoke functions. - kernel.ImportSkill(new TimeSkill(), "time"); + kernel.ImportSkill(new TimePlugin(), "time"); // We need a kernel context to store some information to pass to the prompts and the list // of available skills needed to render prompt templates. diff --git a/dotnet/samples/KernelSyntaxExamples/Example31_CustomPlanner.cs b/dotnet/samples/KernelSyntaxExamples/Example31_CustomPlanner.cs index e254177f7173..3cb661682fd0 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example31_CustomPlanner.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example31_CustomPlanner.cs @@ -10,10 +10,10 @@ using Microsoft.SemanticKernel.Memory; using Microsoft.SemanticKernel.Orchestration; using Microsoft.SemanticKernel.Planning; +using Microsoft.SemanticKernel.Plugins.Core; +using Microsoft.SemanticKernel.Plugins.Web; +using Microsoft.SemanticKernel.Plugins.Web.Bing; using Microsoft.SemanticKernel.SkillDefinition; -using Microsoft.SemanticKernel.Skills.Core; -using Microsoft.SemanticKernel.Skills.Web; -using Microsoft.SemanticKernel.Skills.Web.Bing; using RepoUtils; // ReSharper disable CommentTypo @@ -30,7 +30,7 @@ public static async Task RunAsync() SKContext context = CreateContextQueryContext(kernel); // Create a memory store using the VolatileMemoryStore and the embedding generator registered in the kernel - kernel.ImportSkill(new TextMemorySkill(kernel.Memory)); + kernel.ImportSkill(new TextMemoryPlugin(kernel.Memory)); // Setup defined memories for recall await RememberFactsAsync(kernel); @@ -87,7 +87,7 @@ private static SKContext CreateContextQueryContext(IKernel kernel) private static async Task RememberFactsAsync(IKernel kernel) { - kernel.ImportSkill(new TextMemorySkill(kernel.Memory)); + kernel.ImportSkill(new TextMemoryPlugin(kernel.Memory)); List memoriesToSave = new() { @@ -110,14 +110,14 @@ private static async Task RememberFactsAsync(IKernel kernel) } // ContextQuery is part of the QASkill - // DependsOn: TimeSkill named "time" + // DependsOn: TimePlugin named "time" // DependsOn: BingSkill named "bing" private static IDictionary LoadQASkill(IKernel kernel) { string folder = RepoFiles.SampleSkillsPath(); - kernel.ImportSkill(new TimeSkill(), "time"); + kernel.ImportSkill(new TimePlugin(), "time"); #pragma warning disable CA2000 // Dispose objects before losing scope - var bing = new WebSearchEngineSkill(new BingConnector(TestConfiguration.Bing.ApiKey)); + var bing = new WebSearchEnginePlugin(new BingConnector(TestConfiguration.Bing.ApiKey)); #pragma warning restore CA2000 // Dispose objects before losing scope var search = kernel.ImportSkill(bing, "bing"); diff --git a/dotnet/samples/KernelSyntaxExamples/Example48_GroundednessChecks.cs b/dotnet/samples/KernelSyntaxExamples/Example48_GroundednessChecks.cs index 12fc120f87f9..d068880b0b91 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example48_GroundednessChecks.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example48_GroundednessChecks.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Planning; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using RepoUtils; // ReSharper disable CommentTypo @@ -135,7 +135,7 @@ which are not grounded in the original. "SummarizeSkill", "GroundingSkill"); - kernel.ImportSkill(new TextSkill()); + kernel.ImportSkill(new TextPlugin()); var planner = new SequentialPlanner(kernel); var plan = await planner.CreatePlanAsync(ask); diff --git a/dotnet/samples/KernelSyntaxExamples/Example51_StepwisePlanner.cs b/dotnet/samples/KernelSyntaxExamples/Example51_StepwisePlanner.cs index c59dd16ed927..44a822f9b2c6 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example51_StepwisePlanner.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example51_StepwisePlanner.cs @@ -8,10 +8,10 @@ using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Orchestration; using Microsoft.SemanticKernel.Planning; -using Microsoft.SemanticKernel.Skills.Core; -using Microsoft.SemanticKernel.Skills.Web; -using Microsoft.SemanticKernel.Skills.Web.Bing; -using NCalcSkills; +using Microsoft.SemanticKernel.Plugins.Core; +using Microsoft.SemanticKernel.Plugins.Web; +using Microsoft.SemanticKernel.Plugins.Web.Bing; +using NCalcPlugins; using RepoUtils; /** @@ -108,11 +108,11 @@ private static async Task RunWithQuestion(IKernel kernel, ExecutionResult curren { currentExecutionResult.question = question; var bingConnector = new BingConnector(TestConfiguration.Bing.ApiKey); - var webSearchEngineSkill = new WebSearchEngineSkill(bingConnector); + var webSearchEngineSkill = new WebSearchEnginePlugin(bingConnector); kernel.ImportSkill(webSearchEngineSkill, "WebSearch"); - kernel.ImportSkill(new LanguageCalculatorSkill(kernel), "semanticCalculator"); - kernel.ImportSkill(new TimeSkill(), "time"); + kernel.ImportSkill(new LanguageCalculatorPlugin(kernel), "semanticCalculator"); + kernel.ImportSkill(new TimePlugin(), "time"); // StepwisePlanner is instructed to depend on available functions. // We expose this function to increase the flexibility in it's ability to answer diff --git a/dotnet/samples/KernelSyntaxExamples/Example56_TemplateNativeFunctionsWithMultipleArguments.cs b/dotnet/samples/KernelSyntaxExamples/Example56_TemplateNativeFunctionsWithMultipleArguments.cs index 5a0ba83fd391..6675d75ac511 100644 --- a/dotnet/samples/KernelSyntaxExamples/Example56_TemplateNativeFunctionsWithMultipleArguments.cs +++ b/dotnet/samples/KernelSyntaxExamples/Example56_TemplateNativeFunctionsWithMultipleArguments.cs @@ -3,7 +3,7 @@ using System; using System.Threading.Tasks; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using Microsoft.SemanticKernel.TemplateEngine.Prompt; using RepoUtils; @@ -45,7 +45,7 @@ public static async Task RunAsync() // Load native skill into the kernel skill collection, sharing its functions with prompt templates // Functions loaded here are available as "text.*" - kernel.ImportSkill(new TextSkill(), "text"); + kernel.ImportSkill(new TextPlugin(), "text"); // Semantic Function invoking text.Concat native function with named arguments input and input2 where input is a string and input2 is set to a variable from context called word2. const string FunctionDefinition = @" diff --git a/dotnet/samples/KernelSyntaxExamples/KernelSyntaxExamples.csproj b/dotnet/samples/KernelSyntaxExamples/KernelSyntaxExamples.csproj index 278304336bf4..ba456f672c57 100644 --- a/dotnet/samples/KernelSyntaxExamples/KernelSyntaxExamples.csproj +++ b/dotnet/samples/KernelSyntaxExamples/KernelSyntaxExamples.csproj @@ -48,13 +48,13 @@ - + - + - + diff --git a/dotnet/samples/KernelSyntaxExamples/Skills/StaticTextSkill.cs b/dotnet/samples/KernelSyntaxExamples/Skills/StaticTextSkill.cs index e89ae60c02b8..470f2102ed23 100644 --- a/dotnet/samples/KernelSyntaxExamples/Skills/StaticTextSkill.cs +++ b/dotnet/samples/KernelSyntaxExamples/Skills/StaticTextSkill.cs @@ -5,7 +5,7 @@ namespace Skills; -public sealed class StaticTextSkill +public sealed class StaticTextPlugin { [SKFunction, Description("Change all string chars to uppercase")] public static string Uppercase([Description("Text to uppercase")] string input) => diff --git a/dotnet/samples/NCalcSkills/LanguageCalculatorSkill.cs b/dotnet/samples/NCalcPlugins/LanguageCalculatorPlugin.cs similarity index 95% rename from dotnet/samples/NCalcSkills/LanguageCalculatorSkill.cs rename to dotnet/samples/NCalcPlugins/LanguageCalculatorPlugin.cs index b9ff248af680..a4180b8b69ac 100644 --- a/dotnet/samples/NCalcSkills/LanguageCalculatorSkill.cs +++ b/dotnet/samples/NCalcPlugins/LanguageCalculatorPlugin.cs @@ -9,7 +9,7 @@ using Microsoft.SemanticKernel.SkillDefinition; using NCalc; -namespace NCalcSkills; +namespace NCalcPlugins; /// /// Skill that enables the comprehension of mathematical problems presented in English / natural-language text, followed by the execution of the necessary calculations to solve those problems. @@ -18,12 +18,12 @@ namespace NCalcSkills; /// usage : /// var kernel = new KernelBuilder().WithLogger(ConsoleLogger.Logger).Build(); /// var question = "what is the square root of 625"; -/// var calculatorSkill = kernel.ImportSkill(new LanguageCalculatorSkill(kernel)); +/// var calculatorSkill = kernel.ImportSkill(new LanguageCalculatorPlugin(kernel)); /// var summary = await kernel.RunAsync(questions, calculatorSkill["Calculate"]); /// Console.WriteLine("Result :"); /// Console.WriteLine(summary.Result); /// -public class LanguageCalculatorSkill +public class LanguageCalculatorPlugin { private readonly ISKFunction _mathTranslator; @@ -62,14 +62,14 @@ [End of Examples] "; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The kernel to be used for creating the semantic function. - public LanguageCalculatorSkill(IKernel kernel) + public LanguageCalculatorPlugin(IKernel kernel) { this._mathTranslator = kernel.CreateSemanticFunction( MathTranslatorPrompt, - skillName: nameof(LanguageCalculatorSkill), + skillName: nameof(LanguageCalculatorPlugin), functionName: "TranslateMathProblem", description: "Used by 'Calculator' function.", maxTokens: 256, diff --git a/dotnet/samples/NCalcSkills/NCalcSkills.csproj b/dotnet/samples/NCalcPlugins/NCalcPlugins.csproj similarity index 100% rename from dotnet/samples/NCalcSkills/NCalcSkills.csproj rename to dotnet/samples/NCalcPlugins/NCalcPlugins.csproj diff --git a/dotnet/samples/NCalcSkills/SimpleCalculatorSkill.cs b/dotnet/samples/NCalcPlugins/SimpleCalculatorPlugin.cs similarity index 86% rename from dotnet/samples/NCalcSkills/SimpleCalculatorSkill.cs rename to dotnet/samples/NCalcPlugins/SimpleCalculatorPlugin.cs index 28fb31b3e514..8257df8ba9d6 100644 --- a/dotnet/samples/NCalcSkills/SimpleCalculatorSkill.cs +++ b/dotnet/samples/NCalcPlugins/SimpleCalculatorPlugin.cs @@ -3,26 +3,26 @@ using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.SkillDefinition; -namespace NCalcSkills; +namespace NCalcPlugins; /// /// Simple calculator skill that evaluates a mathematical expression. /// -public class SimpleCalculatorSkill +public class SimpleCalculatorPlugin { private readonly ISKFunction _mathTranslator; private static readonly string[] s_stopSequences = new[] { "Problem:", "Solution:" }; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The kernel used to create the semantic function. - public SimpleCalculatorSkill(IKernel kernel) + public SimpleCalculatorPlugin(IKernel kernel) { this._mathTranslator = kernel.CreateSemanticFunction( "Task: Give the final solution for the problem. Be as concise as possible.\nProblem:4+4\nSolution:8\nProblem:{{$input}}\nSolution:\n", - skillName: nameof(SimpleCalculatorSkill), + skillName: nameof(SimpleCalculatorPlugin), functionName: "Calculator", description: "Evaluate a mathematical expression. Input is a valid mathematical expression that could be executed by a simple calculator i.e. add, subtract, multiply and divide. Cannot use variables.", maxTokens: 256, diff --git a/dotnet/src/Extensions/Planning.ActionPlanner/ActionPlanner.cs b/dotnet/src/Extensions/Planning.ActionPlanner/ActionPlanner.cs index 14bfcf4b196f..26d8d5beb29a 100644 --- a/dotnet/src/Extensions/Planning.ActionPlanner/ActionPlanner.cs +++ b/dotnet/src/Extensions/Planning.ActionPlanner/ActionPlanner.cs @@ -180,7 +180,7 @@ public string GoodExamples( Parameter ""path"": Destination file. (default value: sample.txt) Parameter ""content"": File content. // Get the current time. -TimeSkill.Time +TimePlugin.Time No parameters. // Makes a POST request to a uri. HttpSkill.PostAsync @@ -214,7 +214,7 @@ public string EdgeCaseExamples( [EXAMPLE] - List of functions: // Get the current time. -TimeSkill.Time +TimePlugin.Time No parameters. // Write a file. FileIOSkill.WriteAsync diff --git a/dotnet/src/IntegrationTests/IntegrationTests.csproj b/dotnet/src/IntegrationTests/IntegrationTests.csproj index 6191702dcebf..1c2e2fa0c4cb 100644 --- a/dotnet/src/IntegrationTests/IntegrationTests.csproj +++ b/dotnet/src/IntegrationTests/IntegrationTests.csproj @@ -46,9 +46,9 @@ - + - + diff --git a/dotnet/src/IntegrationTests/Planning/StepwisePlanner/StepwisePlannerTests.cs b/dotnet/src/IntegrationTests/Planning/StepwisePlanner/StepwisePlannerTests.cs index e8b9badb341e..71ceda5a9dd8 100644 --- a/dotnet/src/IntegrationTests/Planning/StepwisePlanner/StepwisePlannerTests.cs +++ b/dotnet/src/IntegrationTests/Planning/StepwisePlanner/StepwisePlannerTests.cs @@ -9,9 +9,9 @@ using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Memory; using Microsoft.SemanticKernel.Planning.Stepwise; -using Microsoft.SemanticKernel.Skills.Core; -using Microsoft.SemanticKernel.Skills.Web; -using Microsoft.SemanticKernel.Skills.Web.Bing; +using Microsoft.SemanticKernel.Plugins.Core; +using Microsoft.SemanticKernel.Plugins.Web; +using Microsoft.SemanticKernel.Plugins.Web.Bing; using SemanticKernel.IntegrationTests.TestSettings; using Xunit; using Xunit.Abstractions; @@ -49,9 +49,9 @@ public void CanCreateStepwisePlan(bool useChatModel, string prompt, string expec bool useEmbeddings = false; IKernel kernel = this.InitializeKernel(useEmbeddings, useChatModel); var bingConnector = new BingConnector(this._bingApiKey); - var webSearchEngineSkill = new WebSearchEngineSkill(bingConnector); + var webSearchEngineSkill = new WebSearchEnginePlugin(bingConnector); kernel.ImportSkill(webSearchEngineSkill, "WebSearch"); - kernel.ImportSkill(new TimeSkill(), "time"); + kernel.ImportSkill(new TimePlugin(), "time"); var planner = new Microsoft.SemanticKernel.Planning.StepwisePlanner(kernel, new StepwisePlannerConfig() { MaxIterations = 10 }); @@ -77,9 +77,9 @@ public async void CanExecuteStepwisePlan(bool useChatModel, string prompt, strin bool useEmbeddings = false; IKernel kernel = this.InitializeKernel(useEmbeddings, useChatModel); var bingConnector = new BingConnector(this._bingApiKey); - var webSearchEngineSkill = new WebSearchEngineSkill(bingConnector); + var webSearchEngineSkill = new WebSearchEnginePlugin(bingConnector); kernel.ImportSkill(webSearchEngineSkill, "WebSearch"); - kernel.ImportSkill(new TimeSkill(), "time"); + kernel.ImportSkill(new TimePlugin(), "time"); var planner = new Microsoft.SemanticKernel.Planning.StepwisePlanner(kernel, new StepwisePlannerConfig() { MaxIterations = 10 }); diff --git a/dotnet/src/IntegrationTests/WebSkill/WebSkillTests.cs b/dotnet/src/IntegrationTests/WebSkill/WebSkillTests.cs index 912a086184db..ff939c9ef46d 100644 --- a/dotnet/src/IntegrationTests/WebSkill/WebSkillTests.cs +++ b/dotnet/src/IntegrationTests/WebSkill/WebSkillTests.cs @@ -6,8 +6,8 @@ using Microsoft.Extensions.Configuration; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Orchestration; -using Microsoft.SemanticKernel.Skills.Web; -using Microsoft.SemanticKernel.Skills.Web.Bing; +using Microsoft.SemanticKernel.Plugins.Web; +using Microsoft.SemanticKernel.Plugins.Web.Bing; using Xunit; using Xunit.Abstractions; @@ -49,7 +49,7 @@ public async Task BingSkillTestAsync(string prompt, string expectedAnswerContain BingConnector connector = new(this._bingApiKey, connectorLogger); Assert.NotEmpty(this._bingApiKey); - WebSearchEngineSkill skill = new(connector); + WebSearchEnginePlugin skill = new(connector); var search = kernel.ImportSkill(skill, "WebSearchEngine"); // Act @@ -67,12 +67,12 @@ public async Task WebFileDownloadSkillFileTestAsync() { // Arrange IKernel kernel = Kernel.Builder.WithLoggerFactory(this._logger).Build(); - using XunitLogger skillLogger = new(this._output); - var skill = new WebFileDownloadSkill(skillLogger); + using XunitLogger skillLogger = new(this._output); + var skill = new WebFileDownloadPlugin(skillLogger); var download = kernel.ImportSkill(skill, "WebFileDownload"); string fileWhereToSaveWebPage = Path.GetTempFileName(); var contextVariables = new ContextVariables("https://www.microsoft.com"); - contextVariables.Set(WebFileDownloadSkill.FilePathParamName, fileWhereToSaveWebPage); + contextVariables.Set(WebFileDownloadPlugin.FilePathParamName, fileWhereToSaveWebPage); // Act await kernel.RunAsync(contextVariables, download["DownloadToFile"]); diff --git a/dotnet/src/Skills/Skills.Core/ConversationSummarySkill.cs b/dotnet/src/Plugins/Plugins.Core/ConversationSummaryPlugin.cs similarity index 91% rename from dotnet/src/Skills/Skills.Core/ConversationSummarySkill.cs rename to dotnet/src/Plugins/Plugins.Core/ConversationSummaryPlugin.cs index 30fb4689a3e0..7b9d59e3b156 100644 --- a/dotnet/src/Skills/Skills.Core/ConversationSummarySkill.cs +++ b/dotnet/src/Plugins/Plugins.Core/ConversationSummaryPlugin.cs @@ -7,7 +7,7 @@ using Microsoft.SemanticKernel.SkillDefinition; using Microsoft.SemanticKernel.Text; -namespace Microsoft.SemanticKernel.Skills.Core; +namespace Microsoft.SemanticKernel.Plugins.Core; /// /// Semantic skill that enables conversations summarization. @@ -15,10 +15,10 @@ namespace Microsoft.SemanticKernel.Skills.Core; /// /// /// var kernel Kernel.Builder.Build(); -/// kernel.ImportSkill(new ConversationSummarySkill(kernel)); +/// kernel.ImportSkill(new ConversationSummaryPlugin(kernel)); /// /// -public class ConversationSummarySkill +public class ConversationSummaryPlugin { /// /// The max tokens to process in a single semantic function call. @@ -30,14 +30,14 @@ public class ConversationSummarySkill private readonly ISKFunction _conversationTopicsFunction; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Kernel instance - public ConversationSummarySkill(IKernel kernel) + public ConversationSummaryPlugin(IKernel kernel) { this._summarizeConversationFunction = kernel.CreateSemanticFunction( SemanticFunctionConstants.SummarizeConversationDefinition, - skillName: nameof(ConversationSummarySkill), + skillName: nameof(ConversationSummaryPlugin), description: "Given a section of a conversation transcript, summarize the part of the conversation.", maxTokens: MaxTokens, temperature: 0.1, @@ -45,7 +45,7 @@ public ConversationSummarySkill(IKernel kernel) this._conversationActionItemsFunction = kernel.CreateSemanticFunction( SemanticFunctionConstants.GetConversationActionItemsDefinition, - skillName: nameof(ConversationSummarySkill), + skillName: nameof(ConversationSummaryPlugin), description: "Given a section of a conversation transcript, identify action items.", maxTokens: MaxTokens, temperature: 0.1, @@ -53,7 +53,7 @@ public ConversationSummarySkill(IKernel kernel) this._conversationTopicsFunction = kernel.CreateSemanticFunction( SemanticFunctionConstants.GetConversationTopicsDefinition, - skillName: nameof(ConversationSummarySkill), + skillName: nameof(ConversationSummaryPlugin), description: "Analyze a conversation transcript and extract key topics worth remembering.", maxTokens: MaxTokens, temperature: 0.1, diff --git a/dotnet/src/Skills/Skills.Core/FileIOSkill.cs b/dotnet/src/Plugins/Plugins.Core/FileIOPlugin.cs similarity index 92% rename from dotnet/src/Skills/Skills.Core/FileIOSkill.cs rename to dotnet/src/Plugins/Plugins.Core/FileIOPlugin.cs index 7835516b95e7..597df27f8d38 100644 --- a/dotnet/src/Skills/Skills.Core/FileIOSkill.cs +++ b/dotnet/src/Plugins/Plugins.Core/FileIOPlugin.cs @@ -7,18 +7,18 @@ using System.Threading.Tasks; using Microsoft.SemanticKernel.SkillDefinition; -namespace Microsoft.SemanticKernel.Skills.Core; +namespace Microsoft.SemanticKernel.Plugins.Core; /// /// Read and write from a file. /// /// -/// Usage: kernel.ImportSkill("file", new FileIOSkill()); +/// Usage: kernel.ImportSkill("file", new FileIOPlugin()); /// Examples: /// {{file.readAsync $path }} => "hello world" /// {{file.writeAsync}} /// -public sealed class FileIOSkill +public sealed class FileIOPlugin { /// /// Read a file diff --git a/dotnet/src/Skills/Skills.Core/HttpSkill.cs b/dotnet/src/Plugins/Plugins.Core/HttpPlugin.cs similarity index 89% rename from dotnet/src/Skills/Skills.Core/HttpSkill.cs rename to dotnet/src/Plugins/Plugins.Core/HttpPlugin.cs index 5f0b4c1c1c0d..e685c0dfa433 100644 --- a/dotnet/src/Skills/Skills.Core/HttpSkill.cs +++ b/dotnet/src/Plugins/Plugins.Core/HttpPlugin.cs @@ -7,13 +7,13 @@ using Microsoft.SemanticKernel.Diagnostics; using Microsoft.SemanticKernel.SkillDefinition; -namespace Microsoft.SemanticKernel.Skills.Core; +namespace Microsoft.SemanticKernel.Plugins.Core; /// /// A skill that provides HTTP functionality. /// /// -/// Usage: kernel.ImportSkill("http", new HttpSkill()); +/// Usage: kernel.ImportSkill("http", new HttpPlugin()); /// Examples: /// SKContext.Variables["url"] = "https://www.bing.com" /// {{http.getAsync $url}} @@ -23,25 +23,25 @@ namespace Microsoft.SemanticKernel.Skills.Core; /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1054:URI-like parameters should not be strings", Justification = "Semantic Kernel operates on strings")] -public sealed class HttpSkill +public sealed class HttpPlugin { private readonly HttpClient _client; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public HttpSkill() : this(new HttpClient(NonDisposableHttpClientHandler.Instance, disposeHandler: false)) + public HttpPlugin() : this(new HttpClient(NonDisposableHttpClientHandler.Instance, disposeHandler: false)) { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The HTTP client to use. /// - /// assumes ownership of the instance and will dispose it when the skill is disposed. + /// assumes ownership of the instance and will dispose it when the skill is disposed. /// - public HttpSkill(HttpClient client) => + public HttpPlugin(HttpClient client) => this._client = client; /// diff --git a/dotnet/src/Skills/Skills.Core/MathSkill.cs b/dotnet/src/Plugins/Plugins.Core/MathPlugin.cs similarity index 87% rename from dotnet/src/Skills/Skills.Core/MathSkill.cs rename to dotnet/src/Plugins/Plugins.Core/MathPlugin.cs index 7878f3d7726d..a9e63dc096c9 100644 --- a/dotnet/src/Skills/Skills.Core/MathSkill.cs +++ b/dotnet/src/Plugins/Plugins.Core/MathPlugin.cs @@ -3,17 +3,17 @@ using System.ComponentModel; using Microsoft.SemanticKernel.SkillDefinition; -namespace Microsoft.SemanticKernel.Skills.Core; +namespace Microsoft.SemanticKernel.Plugins.Core; /// -/// MathSkill provides a set of functions to make Math calculations. +/// MathPlugin provides a set of functions to make Math calculations. /// /// -/// Usage: kernel.ImportSkill("math", new MathSkill()); +/// Usage: kernel.ImportSkill("math", new MathPlugin()); /// Examples: /// {{math.Add}} => Returns the sum of FirstNumber and SecondNumber (provided in the SKContext) /// -public sealed class MathSkill +public sealed class MathPlugin { /// /// Returns the Addition result of initial and amount values provided. diff --git a/dotnet/src/Skills/Skills.Core/Skills.Core.csproj b/dotnet/src/Plugins/Plugins.Core/Plugins.Core.csproj similarity index 76% rename from dotnet/src/Skills/Skills.Core/Skills.Core.csproj rename to dotnet/src/Plugins/Plugins.Core/Plugins.Core.csproj index 3d9e6e4b1a89..3432c5c4837b 100644 --- a/dotnet/src/Skills/Skills.Core/Skills.Core.csproj +++ b/dotnet/src/Plugins/Plugins.Core/Plugins.Core.csproj @@ -2,7 +2,7 @@ - Microsoft.SemanticKernel.Skills.Core + Microsoft.SemanticKernel.Plugins.Core $(AssemblyName) netstandard2.0 @@ -12,8 +12,8 @@ - Semantic Kernel - Core Skills - Semantic Kernel core skills. + Semantic Kernel - Core Plugins + Semantic Kernel core plugins. diff --git a/dotnet/src/Skills/Skills.Core/SemanticFunctionConstants.cs b/dotnet/src/Plugins/Plugins.Core/SemanticFunctionConstants.cs similarity index 98% rename from dotnet/src/Skills/Skills.Core/SemanticFunctionConstants.cs rename to dotnet/src/Plugins/Plugins.Core/SemanticFunctionConstants.cs index 329b21561b85..eaa18c28c93b 100644 --- a/dotnet/src/Skills/Skills.Core/SemanticFunctionConstants.cs +++ b/dotnet/src/Plugins/Plugins.Core/SemanticFunctionConstants.cs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. -namespace Microsoft.SemanticKernel.Skills.Core; +namespace Microsoft.SemanticKernel.Plugins.Core; internal static class SemanticFunctionConstants { diff --git a/dotnet/src/Skills/Skills.Core/TextMemorySkill.cs b/dotnet/src/Plugins/Plugins.Core/TextMemoryPlugin.cs similarity index 89% rename from dotnet/src/Skills/Skills.Core/TextMemorySkill.cs rename to dotnet/src/Plugins/Plugins.Core/TextMemoryPlugin.cs index b3e4db59760d..12ee796c4595 100644 --- a/dotnet/src/Skills/Skills.Core/TextMemorySkill.cs +++ b/dotnet/src/Plugins/Plugins.Core/TextMemoryPlugin.cs @@ -11,18 +11,18 @@ using Microsoft.SemanticKernel.Memory; using Microsoft.SemanticKernel.SkillDefinition; -namespace Microsoft.SemanticKernel.Skills.Core; +namespace Microsoft.SemanticKernel.Plugins.Core; /// -/// TextMemorySkill provides a skill to save or recall information from the long or short term memory. +/// TextMemoryPlugin provides a skill to save or recall information from the long or short term memory. /// /// -/// Usage: kernel.ImportSkill("memory", new TextMemorySkill()); +/// Usage: kernel.ImportSkill("memory", new TextMemoryPlugin()); /// Examples: /// SKContext.Variables["input"] = "what is the capital of France?" /// {{memory.recall $input }} => "Paris" /// -public sealed class TextMemorySkill +public sealed class TextMemoryPlugin { /// /// Name of the context variable used to specify which memory collection to use. @@ -51,9 +51,9 @@ public sealed class TextMemorySkill private ISemanticTextMemory _memory; /// - /// Creates a new instance of the TextMemorySkill + /// Creates a new instance of the TextMemoryPlugin /// - public TextMemorySkill(ISemanticTextMemory memory) + public TextMemoryPlugin(ISemanticTextMemory memory) { this._memory = memory; } @@ -66,7 +66,7 @@ public TextMemorySkill(ISemanticTextMemory memory) /// The to use for logging. If null, no logging will be performed. /// The to monitor for cancellation requests. The default is . /// - /// SKContext.Variables[TextMemorySkill.KeyParam] = "countryInfo1" + /// SKContext.Variables[TextMemoryPlugin.KeyParam] = "countryInfo1" /// {{memory.retrieve }} /// [SKFunction, Description("Key-based lookup for a specific memory")] @@ -79,7 +79,7 @@ public async Task RetrieveAsync( Verify.NotNullOrWhiteSpace(collection); Verify.NotNullOrWhiteSpace(key); - loggerFactory?.CreateLogger(typeof(TextMemorySkill)).LogDebug("Recalling memory with key '{0}' from collection '{1}'", key, collection); + loggerFactory?.CreateLogger(typeof(TextMemoryPlugin)).LogDebug("Recalling memory with key '{0}' from collection '{1}'", key, collection); var memory = await this._memory.GetAsync(collection, key, cancellationToken: cancellationToken).ConfigureAwait(false); @@ -112,7 +112,7 @@ public async Task RecallAsync( relevance ??= DefaultRelevance; limit ??= DefaultLimit; - ILogger? logger = loggerFactory?.CreateLogger(typeof(TextMemorySkill)); + ILogger? logger = loggerFactory?.CreateLogger(typeof(TextMemoryPlugin)); logger?.LogDebug("Searching memories in collection '{0}', relevance '{1}'", collection, relevance); @@ -137,7 +137,7 @@ public async Task RecallAsync( /// /// /// SKContext.Variables["input"] = "the capital of France is Paris" - /// SKContext.Variables[TextMemorySkill.KeyParam] = "countryInfo1" + /// SKContext.Variables[TextMemoryPlugin.KeyParam] = "countryInfo1" /// {{memory.save $input }} /// /// The information to save @@ -156,7 +156,7 @@ public async Task SaveAsync( Verify.NotNullOrWhiteSpace(collection); Verify.NotNullOrWhiteSpace(key); - loggerFactory?.CreateLogger(typeof(TextMemorySkill)).LogDebug("Saving memory to collection '{0}'", collection); + loggerFactory?.CreateLogger(typeof(TextMemoryPlugin)).LogDebug("Saving memory to collection '{0}'", collection); await this._memory.SaveInformationAsync(collection, text: input, id: key, cancellationToken: cancellationToken).ConfigureAwait(false); } @@ -165,7 +165,7 @@ public async Task SaveAsync( /// Remove specific memory /// /// - /// SKContext.Variables[TextMemorySkill.KeyParam] = "countryInfo1" + /// SKContext.Variables[TextMemoryPlugin.KeyParam] = "countryInfo1" /// {{memory.remove }} /// /// Memories collection associated with the information to save @@ -182,7 +182,7 @@ public async Task RemoveAsync( Verify.NotNullOrWhiteSpace(collection); Verify.NotNullOrWhiteSpace(key); - loggerFactory?.CreateLogger(typeof(TextMemorySkill)).LogDebug("Removing memory from collection '{0}'", collection); + loggerFactory?.CreateLogger(typeof(TextMemoryPlugin)).LogDebug("Removing memory from collection '{0}'", collection); await this._memory.RemoveAsync(collection, key, cancellationToken: cancellationToken).ConfigureAwait(false); } diff --git a/dotnet/src/Skills/Skills.Core/TextSkill.cs b/dotnet/src/Plugins/Plugins.Core/TextPlugin.cs similarity index 96% rename from dotnet/src/Skills/Skills.Core/TextSkill.cs rename to dotnet/src/Plugins/Plugins.Core/TextPlugin.cs index 0fc1de64a2de..b2bf24a98ca4 100644 --- a/dotnet/src/Skills/Skills.Core/TextSkill.cs +++ b/dotnet/src/Plugins/Plugins.Core/TextPlugin.cs @@ -4,13 +4,13 @@ using System.Globalization; using Microsoft.SemanticKernel.SkillDefinition; -namespace Microsoft.SemanticKernel.Skills.Core; +namespace Microsoft.SemanticKernel.Plugins.Core; /// -/// TextSkill provides a set of functions to manipulate strings. +/// TextPlugin provides a set of functions to manipulate strings. /// /// -/// Usage: kernel.ImportSkill("text", new TextSkill()); +/// Usage: kernel.ImportSkill("text", new TextPlugin()); /// /// Examples: /// SKContext.Variables["input"] = " hello world " @@ -22,7 +22,7 @@ namespace Microsoft.SemanticKernel.Skills.Core; /// SKContext.Variables["input"] = "HELLO WORLD" /// {{text.lowercase $input}} => "hello world" /// -public sealed class TextSkill +public sealed class TextPlugin { /// /// Trim whitespace from the start and end of a string. diff --git a/dotnet/src/Skills/Skills.Core/TimeSkill.cs b/dotnet/src/Plugins/Plugins.Core/TimePlugin.cs similarity index 97% rename from dotnet/src/Skills/Skills.Core/TimeSkill.cs rename to dotnet/src/Plugins/Plugins.Core/TimePlugin.cs index a3ca9782d9bf..b9680b9fd022 100644 --- a/dotnet/src/Skills/Skills.Core/TimeSkill.cs +++ b/dotnet/src/Plugins/Plugins.Core/TimePlugin.cs @@ -4,13 +4,13 @@ using System.ComponentModel; using Microsoft.SemanticKernel.SkillDefinition; -namespace Microsoft.SemanticKernel.Skills.Core; +namespace Microsoft.SemanticKernel.Plugins.Core; /// -/// TimeSkill provides a set of functions to get the current time and date. +/// TimePlugin provides a set of functions to get the current time and date. /// /// -/// Usage: kernel.ImportSkill("time", new TimeSkill()); +/// Usage: kernel.ImportSkill("time", new TimePlugin()); /// Examples: /// {{time.date}} => Sunday, 12 January, 2031 /// {{time.today}} => Sunday, 12 January, 2031 @@ -38,7 +38,7 @@ namespace Microsoft.SemanticKernel.Skills.Core; /// Note: the time represents the time on the hw/vm/machine where the kernel is running. /// TODO: import and use user's timezone /// -public sealed class TimeSkill +public sealed class TimePlugin { /// /// Get the current date diff --git a/dotnet/src/Skills/Skills.Core/WaitSkill.cs b/dotnet/src/Plugins/Plugins.Core/WaitPlugin.cs similarity index 83% rename from dotnet/src/Skills/Skills.Core/WaitSkill.cs rename to dotnet/src/Plugins/Plugins.Core/WaitPlugin.cs index caacc12f4710..d1b22cdc5ab0 100644 --- a/dotnet/src/Skills/Skills.Core/WaitSkill.cs +++ b/dotnet/src/Plugins/Plugins.Core/WaitPlugin.cs @@ -4,17 +4,17 @@ using System.Threading.Tasks; using Microsoft.SemanticKernel.SkillDefinition; -namespace Microsoft.SemanticKernel.Skills.Core; +namespace Microsoft.SemanticKernel.Plugins.Core; /// -/// WaitSkill provides a set of functions to wait before making the rest of operations. +/// WaitPlugin provides a set of functions to wait before making the rest of operations. /// /// -/// Usage: kernel.ImportSkill("wait", new WaitSkill()); +/// Usage: kernel.ImportSkill("wait", new WaitPlugin()); /// Examples: /// {{wait.seconds 10}} => Wait 10 seconds /// -public sealed class WaitSkill +public sealed class WaitPlugin { private readonly IWaitProvider _waitProvider; @@ -40,10 +40,10 @@ public Task DelayAsync(int milliSeconds) } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// An optional wait provider. If not provided, a default wait provider will be used. - public WaitSkill(IWaitProvider? waitProvider = null) + public WaitPlugin(IWaitProvider? waitProvider = null) { this._waitProvider = waitProvider ?? new WaitProvider(); } diff --git a/dotnet/src/Skills/Skills.Document/DocumentSkill.cs b/dotnet/src/Plugins/Plugins.Document/DocumentPlugin.cs similarity index 85% rename from dotnet/src/Skills/Skills.Document/DocumentSkill.cs rename to dotnet/src/Plugins/Plugins.Document/DocumentPlugin.cs index 8d0b126724c4..242a7fc36f0e 100644 --- a/dotnet/src/Skills/Skills.Document/DocumentSkill.cs +++ b/dotnet/src/Plugins/Plugins.Document/DocumentPlugin.cs @@ -8,36 +8,36 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.SemanticKernel.Orchestration; +using Microsoft.SemanticKernel.Plugins.Document.FileSystem; using Microsoft.SemanticKernel.SkillDefinition; -using Microsoft.SemanticKernel.Skills.Document.FileSystem; -namespace Microsoft.SemanticKernel.Skills.Document; +namespace Microsoft.SemanticKernel.Plugins.Document; //********************************************************************************************************************** // EXAMPLE USAGE // Option #1: as a standalone C# function // -// DocumentSkill documentSkill = new(new WordDocumentConnector(), new LocalDriveConnector()); +// DocumentPlugin documentPlugin = new(new WordDocumentConnector(), new LocalDriveConnector()); // string filePath = "PATH_TO_DOCX_FILE.docx"; -// string text = await documentSkill.ReadTextAsync(filePath); +// string text = await documentPlugin.ReadTextAsync(filePath); // Console.WriteLine(text); // // // Option #2: with the Semantic Kernel // -// DocumentSkill documentSkill = new(new WordDocumentConnector(), new LocalDriveConnector()); +// DocumentPlugin documentPlugin = new(new WordDocumentConnector(), new LocalDriveConnector()); // string filePath = "PATH_TO_DOCX_FILE.docx"; // ISemanticKernel kernel = SemanticKernel.Build(); // var result = await kernel.RunAsync( // filePath, -// documentSkill.ReadTextAsync); +// documentPlugin.ReadTextAsync); // Console.WriteLine(result); //********************************************************************************************************************** /// /// Skill for interacting with documents (e.g. Microsoft Word) /// -public sealed class DocumentSkill +public sealed class DocumentPlugin { /// /// parameter names. @@ -55,16 +55,16 @@ public static class Parameters private readonly ILogger _logger; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Document connector /// File system connector /// The to use for logging. If null, no logging will be performed. - public DocumentSkill(IDocumentConnector documentConnector, IFileSystemConnector fileSystemConnector, ILoggerFactory? loggerFactory = null) + public DocumentPlugin(IDocumentConnector documentConnector, IFileSystemConnector fileSystemConnector, ILoggerFactory? loggerFactory = null) { this._documentConnector = documentConnector ?? throw new ArgumentNullException(nameof(documentConnector)); this._fileSystemConnector = fileSystemConnector ?? throw new ArgumentNullException(nameof(fileSystemConnector)); - this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(DocumentSkill)) : NullLogger.Instance; + this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(DocumentPlugin)) : NullLogger.Instance; } /// diff --git a/dotnet/src/Skills/Skills.Document/FileSystem/IFileSystemConnector.cs b/dotnet/src/Plugins/Plugins.Document/FileSystem/IFileSystemConnector.cs similarity index 96% rename from dotnet/src/Skills/Skills.Document/FileSystem/IFileSystemConnector.cs rename to dotnet/src/Plugins/Plugins.Document/FileSystem/IFileSystemConnector.cs index c98d61878012..bcb274a23808 100644 --- a/dotnet/src/Skills/Skills.Document/FileSystem/IFileSystemConnector.cs +++ b/dotnet/src/Plugins/Plugins.Document/FileSystem/IFileSystemConnector.cs @@ -4,7 +4,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Microsoft.SemanticKernel.Skills.Document.FileSystem; +namespace Microsoft.SemanticKernel.Plugins.Document.FileSystem; /// /// Interface for filesystem connections. diff --git a/dotnet/src/Skills/Skills.Document/FileSystem/LocalFileSystemConnector.cs b/dotnet/src/Plugins/Plugins.Document/FileSystem/LocalFileSystemConnector.cs similarity index 98% rename from dotnet/src/Skills/Skills.Document/FileSystem/LocalFileSystemConnector.cs rename to dotnet/src/Plugins/Plugins.Document/FileSystem/LocalFileSystemConnector.cs index dbe6ac21289f..fd708eb24af1 100644 --- a/dotnet/src/Skills/Skills.Document/FileSystem/LocalFileSystemConnector.cs +++ b/dotnet/src/Plugins/Plugins.Document/FileSystem/LocalFileSystemConnector.cs @@ -5,7 +5,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Microsoft.SemanticKernel.Skills.Document.FileSystem; +namespace Microsoft.SemanticKernel.Plugins.Document.FileSystem; #pragma warning disable CA1031 // Exceptions are caught and returned in a task diff --git a/dotnet/src/Skills/Skills.Document/IDocumentConnector.cs b/dotnet/src/Plugins/Plugins.Document/IDocumentConnector.cs similarity index 94% rename from dotnet/src/Skills/Skills.Document/IDocumentConnector.cs rename to dotnet/src/Plugins/Plugins.Document/IDocumentConnector.cs index 893c7ae4e106..82934b86cecf 100644 --- a/dotnet/src/Skills/Skills.Document/IDocumentConnector.cs +++ b/dotnet/src/Plugins/Plugins.Document/IDocumentConnector.cs @@ -2,7 +2,7 @@ using System.IO; -namespace Microsoft.SemanticKernel.Skills.Document; +namespace Microsoft.SemanticKernel.Plugins.Document; /// /// Interface for document connections (e.g. Microsoft Word) diff --git a/dotnet/src/Skills/Skills.Document/OpenXml/Extensions/WordprocessingDocumentEx.cs b/dotnet/src/Plugins/Plugins.Document/OpenXml/Extensions/WordprocessingDocumentEx.cs similarity index 97% rename from dotnet/src/Skills/Skills.Document/OpenXml/Extensions/WordprocessingDocumentEx.cs rename to dotnet/src/Plugins/Plugins.Document/OpenXml/Extensions/WordprocessingDocumentEx.cs index 7afb1037b80c..81d8838532ea 100644 --- a/dotnet/src/Skills/Skills.Document/OpenXml/Extensions/WordprocessingDocumentEx.cs +++ b/dotnet/src/Plugins/Plugins.Document/OpenXml/Extensions/WordprocessingDocumentEx.cs @@ -5,7 +5,7 @@ using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; -namespace Microsoft.SemanticKernel.Skills.Document.OpenXml.Extensions; +namespace Microsoft.SemanticKernel.Plugins.Document.OpenXml.Extensions; /// /// Extension methods for DocumentFormat.OpenXml.Packaging.WordprocessingDocument diff --git a/dotnet/src/Skills/Skills.Document/OpenXml/WordDocumentConnector.cs b/dotnet/src/Plugins/Plugins.Document/OpenXml/WordDocumentConnector.cs similarity index 95% rename from dotnet/src/Skills/Skills.Document/OpenXml/WordDocumentConnector.cs rename to dotnet/src/Plugins/Plugins.Document/OpenXml/WordDocumentConnector.cs index 148ac5b1936e..8d745536d915 100644 --- a/dotnet/src/Skills/Skills.Document/OpenXml/WordDocumentConnector.cs +++ b/dotnet/src/Plugins/Plugins.Document/OpenXml/WordDocumentConnector.cs @@ -3,9 +3,9 @@ using System.IO; using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; -using Microsoft.SemanticKernel.Skills.Document.OpenXml.Extensions; +using Microsoft.SemanticKernel.Plugins.Document.OpenXml.Extensions; -namespace Microsoft.SemanticKernel.Skills.Document.OpenXml; +namespace Microsoft.SemanticKernel.Plugins.Document.OpenXml; /// /// Connector for Microsoft Word (.docx) files diff --git a/dotnet/src/Skills/Skills.Document/Skills.Document.csproj b/dotnet/src/Plugins/Plugins.Document/Plugins.Document.csproj similarity index 72% rename from dotnet/src/Skills/Skills.Document/Skills.Document.csproj rename to dotnet/src/Plugins/Plugins.Document/Plugins.Document.csproj index 80f6be777539..fdc9d46c39be 100644 --- a/dotnet/src/Skills/Skills.Document/Skills.Document.csproj +++ b/dotnet/src/Plugins/Plugins.Document/Plugins.Document.csproj @@ -2,7 +2,7 @@ - Microsoft.SemanticKernel.Skills.Document + Microsoft.SemanticKernel.Plugins.Document $(AssemblyName) netstandard2.0 @@ -11,8 +11,8 @@ - Semantic Kernel - Document Skill - Semantic Kernel Document Skill: Word processing, OpenXML, etc. + Semantic Kernel - Document Plugins + Semantic Kernel Document Plugins: Word processing, OpenXML, etc. diff --git a/dotnet/src/Skills/Skills.MsGraph/CalendarSkill.cs b/dotnet/src/Plugins/Plugins.MsGraph/CalendarPlugin.cs similarity index 91% rename from dotnet/src/Skills/Skills.MsGraph/CalendarSkill.cs rename to dotnet/src/Plugins/Plugins.MsGraph/CalendarPlugin.cs index ac06b5d63099..8ac97131ec6a 100644 --- a/dotnet/src/Skills/Skills.MsGraph/CalendarSkill.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/CalendarPlugin.cs @@ -12,15 +12,15 @@ using Microsoft.Extensions.Logging.Abstractions; using Microsoft.SemanticKernel.Orchestration; using Microsoft.SemanticKernel.SkillDefinition; -using Microsoft.SemanticKernel.Skills.MsGraph.Diagnostics; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph.Diagnostics; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; -namespace Microsoft.SemanticKernel.Skills.MsGraph; +namespace Microsoft.SemanticKernel.Plugins.MsGraph; /// /// Skill for calendar operations. /// -public sealed class CalendarSkill +public sealed class CalendarPlugin { /// /// parameter names. @@ -72,16 +72,16 @@ public static class Parameters }; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Calendar connector. /// The to use for logging. If null, no logging will be performed. - public CalendarSkill(ICalendarConnector connector, ILoggerFactory? loggerFactory = null) + public CalendarPlugin(ICalendarConnector connector, ILoggerFactory? loggerFactory = null) { Ensure.NotNull(connector, nameof(connector)); this._connector = connector; - this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(CalendarSkill)) : NullLogger.Instance; + this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(CalendarPlugin)) : NullLogger.Instance; } /// diff --git a/dotnet/src/Skills/Skills.MsGraph/CloudDriveSkill.cs b/dotnet/src/Plugins/Plugins.MsGraph/CloudDrivePlugin.cs similarity index 91% rename from dotnet/src/Skills/Skills.MsGraph/CloudDriveSkill.cs rename to dotnet/src/Plugins/Plugins.MsGraph/CloudDrivePlugin.cs index 30a31b9b5e84..a5a69087222d 100644 --- a/dotnet/src/Skills/Skills.MsGraph/CloudDriveSkill.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/CloudDrivePlugin.cs @@ -9,14 +9,14 @@ using Microsoft.Extensions.Logging.Abstractions; using Microsoft.SemanticKernel.Orchestration; using Microsoft.SemanticKernel.SkillDefinition; -using Microsoft.SemanticKernel.Skills.MsGraph.Diagnostics; +using Microsoft.SemanticKernel.Plugins.MsGraph.Diagnostics; -namespace Microsoft.SemanticKernel.Skills.MsGraph; +namespace Microsoft.SemanticKernel.Plugins.MsGraph; /// /// Cloud drive skill (e.g. OneDrive). /// -public sealed class CloudDriveSkill +public sealed class CloudDrivePlugin { /// /// parameter names. @@ -33,16 +33,16 @@ public static class Parameters private readonly ILogger _logger; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The cloud drive connector. /// The to use for logging. If null, no logging will be performed. - public CloudDriveSkill(ICloudDriveConnector connector, ILoggerFactory? loggerFactory = null) + public CloudDrivePlugin(ICloudDriveConnector connector, ILoggerFactory? loggerFactory = null) { Ensure.NotNull(connector, nameof(connector)); this._connector = connector; - this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(CloudDriveSkill)) : NullLogger.Instance; + this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(CloudDrivePlugin)) : NullLogger.Instance; } /// diff --git a/dotnet/src/Skills/Skills.MsGraph/Connectors/Client/MsGraphClientLoggingHandler.cs b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/Client/MsGraphClientLoggingHandler.cs similarity index 97% rename from dotnet/src/Skills/Skills.MsGraph/Connectors/Client/MsGraphClientLoggingHandler.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Connectors/Client/MsGraphClientLoggingHandler.cs index 5f74814ce7dc..88196b4a77ff 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Connectors/Client/MsGraphClientLoggingHandler.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/Client/MsGraphClientLoggingHandler.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Connectors.Client; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Connectors.Client; /// /// An HTTPClient logging handler for ensuring diagnostic headers for Graph API calls are available. diff --git a/dotnet/src/Skills/Skills.MsGraph/Connectors/Client/MsGraphConfiguration.cs b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/Client/MsGraphConfiguration.cs similarity index 95% rename from dotnet/src/Skills/Skills.MsGraph/Connectors/Client/MsGraphConfiguration.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Connectors/Client/MsGraphConfiguration.cs index 062bdf85f214..6a8e3e593b2a 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Connectors/Client/MsGraphConfiguration.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/Client/MsGraphConfiguration.cs @@ -5,7 +5,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Connectors.Client; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Connectors.Client; /// /// Graph API connector configuration model. diff --git a/dotnet/src/Skills/Skills.MsGraph/Connectors/CredentialManagers/LocalUserMSALCredentialManager.cs b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/CredentialManagers/LocalUserMSALCredentialManager.cs similarity index 97% rename from dotnet/src/Skills/Skills.MsGraph/Connectors/CredentialManagers/LocalUserMSALCredentialManager.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Connectors/CredentialManagers/LocalUserMSALCredentialManager.cs index 6bda6172326b..94dafe4b0c74 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Connectors/CredentialManagers/LocalUserMSALCredentialManager.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/CredentialManagers/LocalUserMSALCredentialManager.cs @@ -7,9 +7,9 @@ using System.Threading.Tasks; using Microsoft.Identity.Client; using Microsoft.Identity.Client.Extensions.Msal; -using Microsoft.SemanticKernel.Skills.MsGraph.Connectors.Diagnostics; +using Microsoft.SemanticKernel.Plugins.MsGraph.Connectors.Diagnostics; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Connectors.CredentialManagers; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Connectors.CredentialManagers; /// /// Manages acquiring and caching MSAL credentials locally. diff --git a/dotnet/src/Skills/Skills.MsGraph/Connectors/Diagnostics/Ensure.cs b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/Diagnostics/Ensure.cs similarity index 95% rename from dotnet/src/Skills/Skills.MsGraph/Connectors/Diagnostics/Ensure.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Connectors/Diagnostics/Ensure.cs index 8b3e3d3282cd..bab7c077571c 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Connectors/Diagnostics/Ensure.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/Diagnostics/Ensure.cs @@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Connectors.Diagnostics; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Connectors.Diagnostics; /// /// Internal data validation class. diff --git a/dotnet/src/Skills/Skills.MsGraph/Connectors/MicrosoftGraphModelExtensions.cs b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/MicrosoftGraphModelExtensions.cs similarity index 96% rename from dotnet/src/Skills/Skills.MsGraph/Connectors/MicrosoftGraphModelExtensions.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Connectors/MicrosoftGraphModelExtensions.cs index 5be82741ac47..81dd696a99e9 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Connectors/MicrosoftGraphModelExtensions.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/MicrosoftGraphModelExtensions.cs @@ -4,9 +4,9 @@ using System.Linq; using Microsoft.Graph; using Microsoft.Graph.Extensions; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Connectors; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Connectors; /// /// Extensions for converting between Microsoft Graph models and skill models. diff --git a/dotnet/src/Skills/Skills.MsGraph/Connectors/MicrosoftToDoConnector.cs b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/MicrosoftToDoConnector.cs similarity index 96% rename from dotnet/src/Skills/Skills.MsGraph/Connectors/MicrosoftToDoConnector.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Connectors/MicrosoftToDoConnector.cs index 159ce555eb10..615657388836 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Connectors/MicrosoftToDoConnector.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/MicrosoftToDoConnector.cs @@ -8,11 +8,11 @@ using System.Threading.Tasks; using Microsoft.Graph; using Microsoft.SemanticKernel.Diagnostics; -using Microsoft.SemanticKernel.Skills.MsGraph.Connectors.Diagnostics; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph.Connectors.Diagnostics; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; using TaskStatus = Microsoft.Graph.TaskStatus; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Connectors; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Connectors; /// /// Connector for Microsoft To-Do API diff --git a/dotnet/src/Skills/Skills.MsGraph/Connectors/OneDriveConnector.cs b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/OneDriveConnector.cs similarity index 97% rename from dotnet/src/Skills/Skills.MsGraph/Connectors/OneDriveConnector.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Connectors/OneDriveConnector.cs index 281d47638a30..c9a086e3ca2a 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Connectors/OneDriveConnector.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/OneDriveConnector.cs @@ -8,8 +8,8 @@ using System.Threading.Tasks; using Microsoft.Graph; using Microsoft.SemanticKernel.Diagnostics; -using Microsoft.SemanticKernel.Skills.MsGraph.Connectors.Diagnostics; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Connectors; +using Microsoft.SemanticKernel.Plugins.MsGraph.Connectors.Diagnostics; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Connectors; /// /// Connector for OneDrive API diff --git a/dotnet/src/Skills/Skills.MsGraph/Connectors/OrganizationHierarchyConnector.cs b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/OrganizationHierarchyConnector.cs similarity index 97% rename from dotnet/src/Skills/Skills.MsGraph/Connectors/OrganizationHierarchyConnector.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Connectors/OrganizationHierarchyConnector.cs index 32ff6eb608d0..01f0df582b1c 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Connectors/OrganizationHierarchyConnector.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/OrganizationHierarchyConnector.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using Microsoft.Graph; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Connectors; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Connectors; /// /// Connector for Microsoft Graph API for organizational hierarchy. diff --git a/dotnet/src/Skills/Skills.MsGraph/Connectors/OutlookCalendarConnector.cs b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/OutlookCalendarConnector.cs similarity index 94% rename from dotnet/src/Skills/Skills.MsGraph/Connectors/OutlookCalendarConnector.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Connectors/OutlookCalendarConnector.cs index 3dbe78848064..bc856c8bbd4b 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Connectors/OutlookCalendarConnector.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/OutlookCalendarConnector.cs @@ -5,9 +5,9 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Graph; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Connectors; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Connectors; /// /// Connector for Outlook Calendar API diff --git a/dotnet/src/Skills/Skills.MsGraph/Connectors/OutlookMailConnector.cs b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/OutlookMailConnector.cs similarity index 93% rename from dotnet/src/Skills/Skills.MsGraph/Connectors/OutlookMailConnector.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Connectors/OutlookMailConnector.cs index ec4c78efb32a..78c484910bff 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Connectors/OutlookMailConnector.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Connectors/OutlookMailConnector.cs @@ -5,10 +5,10 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Graph; -using Microsoft.SemanticKernel.Skills.MsGraph.Connectors.Diagnostics; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph.Connectors.Diagnostics; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Connectors; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Connectors; /// /// Connector for Outlook Mail API diff --git a/dotnet/src/Skills/Skills.MsGraph/Diagnostics/Ensure.cs b/dotnet/src/Plugins/Plugins.MsGraph/Diagnostics/Ensure.cs similarity index 93% rename from dotnet/src/Skills/Skills.MsGraph/Diagnostics/Ensure.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Diagnostics/Ensure.cs index 69256dbfe2e8..97fdc0102b9c 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Diagnostics/Ensure.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Diagnostics/Ensure.cs @@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Diagnostics; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Diagnostics; internal static class Ensure { diff --git a/dotnet/src/Skills/Skills.MsGraph/Diagnostics/NullableAttributes.cs b/dotnet/src/Plugins/Plugins.MsGraph/Diagnostics/NullableAttributes.cs similarity index 100% rename from dotnet/src/Skills/Skills.MsGraph/Diagnostics/NullableAttributes.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Diagnostics/NullableAttributes.cs diff --git a/dotnet/src/Skills/Skills.MsGraph/EmailSkill.cs b/dotnet/src/Plugins/Plugins.MsGraph/EmailPlugin.cs similarity index 91% rename from dotnet/src/Skills/Skills.MsGraph/EmailSkill.cs rename to dotnet/src/Plugins/Plugins.MsGraph/EmailPlugin.cs index f392a9a095a6..821121b69b17 100644 --- a/dotnet/src/Skills/Skills.MsGraph/EmailSkill.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/EmailPlugin.cs @@ -11,15 +11,15 @@ using Microsoft.Extensions.Logging.Abstractions; using Microsoft.SemanticKernel.Orchestration; using Microsoft.SemanticKernel.SkillDefinition; -using Microsoft.SemanticKernel.Skills.MsGraph.Diagnostics; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph.Diagnostics; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; -namespace Microsoft.SemanticKernel.Skills.MsGraph; +namespace Microsoft.SemanticKernel.Plugins.MsGraph; /// /// Email skill (e.g. Outlook). /// -public sealed class EmailSkill +public sealed class EmailPlugin { /// /// parameter names. @@ -56,16 +56,16 @@ public static class Parameters }; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Email connector. /// The to use for logging. If null, no logging will be performed. - public EmailSkill(IEmailConnector connector, ILoggerFactory? loggerFactory = null) + public EmailPlugin(IEmailConnector connector, ILoggerFactory? loggerFactory = null) { Ensure.NotNull(connector, nameof(connector)); this._connector = connector; - this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(EmailSkill)) : NullLogger.Instance; + this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(EmailPlugin)) : NullLogger.Instance; } /// diff --git a/dotnet/src/Skills/Skills.MsGraph/ICalendarConnector.cs b/dotnet/src/Plugins/Plugins.MsGraph/ICalendarConnector.cs similarity index 93% rename from dotnet/src/Skills/Skills.MsGraph/ICalendarConnector.cs rename to dotnet/src/Plugins/Plugins.MsGraph/ICalendarConnector.cs index 22a9ec7670be..e12f87cfda79 100644 --- a/dotnet/src/Skills/Skills.MsGraph/ICalendarConnector.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/ICalendarConnector.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; -namespace Microsoft.SemanticKernel.Skills.MsGraph; +namespace Microsoft.SemanticKernel.Plugins.MsGraph; /// /// Interface for calendar connections (e.g. Outlook). diff --git a/dotnet/src/Skills/Skills.MsGraph/ICloudDriveConnector.cs b/dotnet/src/Plugins/Plugins.MsGraph/ICloudDriveConnector.cs similarity index 97% rename from dotnet/src/Skills/Skills.MsGraph/ICloudDriveConnector.cs rename to dotnet/src/Plugins/Plugins.MsGraph/ICloudDriveConnector.cs index 854ab7bdbc03..f13fa7240c57 100644 --- a/dotnet/src/Skills/Skills.MsGraph/ICloudDriveConnector.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/ICloudDriveConnector.cs @@ -4,7 +4,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Microsoft.SemanticKernel.Skills.MsGraph; +namespace Microsoft.SemanticKernel.Plugins.MsGraph; /// /// Interface for cloud drive connections (e.g. OneDrive). diff --git a/dotnet/src/Skills/Skills.MsGraph/IEmailConnector.cs b/dotnet/src/Plugins/Plugins.MsGraph/IEmailConnector.cs similarity index 94% rename from dotnet/src/Skills/Skills.MsGraph/IEmailConnector.cs rename to dotnet/src/Plugins/Plugins.MsGraph/IEmailConnector.cs index 3b735a214244..8faf50f973e2 100644 --- a/dotnet/src/Skills/Skills.MsGraph/IEmailConnector.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/IEmailConnector.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; -namespace Microsoft.SemanticKernel.Skills.MsGraph; +namespace Microsoft.SemanticKernel.Plugins.MsGraph; /// /// Interface for email connections (e.g. Outlook). diff --git a/dotnet/src/Skills/Skills.MsGraph/IOrganizationHierarchyConnector.cs b/dotnet/src/Plugins/Plugins.MsGraph/IOrganizationHierarchyConnector.cs similarity index 96% rename from dotnet/src/Skills/Skills.MsGraph/IOrganizationHierarchyConnector.cs rename to dotnet/src/Plugins/Plugins.MsGraph/IOrganizationHierarchyConnector.cs index 79c7aaafbc96..543cbf57cad6 100644 --- a/dotnet/src/Skills/Skills.MsGraph/IOrganizationHierarchyConnector.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/IOrganizationHierarchyConnector.cs @@ -4,7 +4,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Microsoft.SemanticKernel.Skills.MsGraph; +namespace Microsoft.SemanticKernel.Plugins.MsGraph; /// /// Interface for organization hierarchy connections (e.g. Azure AD). diff --git a/dotnet/src/Skills/Skills.MsGraph/ITaskManagementConnector.cs b/dotnet/src/Plugins/Plugins.MsGraph/ITaskManagementConnector.cs similarity index 96% rename from dotnet/src/Skills/Skills.MsGraph/ITaskManagementConnector.cs rename to dotnet/src/Plugins/Plugins.MsGraph/ITaskManagementConnector.cs index 30ee8fcea0f6..56c6cf7d99a3 100644 --- a/dotnet/src/Skills/Skills.MsGraph/ITaskManagementConnector.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/ITaskManagementConnector.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; -namespace Microsoft.SemanticKernel.Skills.MsGraph; +namespace Microsoft.SemanticKernel.Plugins.MsGraph; /// /// Interface for task list connections (e.g. Microsoft To-Do). diff --git a/dotnet/src/Skills/Skills.MsGraph/Models/CalendarEvent.cs b/dotnet/src/Plugins/Plugins.MsGraph/Models/CalendarEvent.cs similarity index 94% rename from dotnet/src/Skills/Skills.MsGraph/Models/CalendarEvent.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Models/CalendarEvent.cs index ff1b644c621b..935aec562780 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Models/CalendarEvent.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Models/CalendarEvent.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Linq; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Models; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Models; /// /// Model for a calendar event. diff --git a/dotnet/src/Skills/Skills.MsGraph/Models/EmailAddress.cs b/dotnet/src/Plugins/Plugins.MsGraph/Models/EmailAddress.cs similarity index 86% rename from dotnet/src/Skills/Skills.MsGraph/Models/EmailAddress.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Models/EmailAddress.cs index 756d6d7382f6..e328b3f0efcc 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Models/EmailAddress.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Models/EmailAddress.cs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. -namespace Microsoft.SemanticKernel.Skills.MsGraph.Models; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Models; /// /// Model for an email address. diff --git a/dotnet/src/Skills/Skills.MsGraph/Models/EmailMessage.cs b/dotnet/src/Plugins/Plugins.MsGraph/Models/EmailMessage.cs similarity index 95% rename from dotnet/src/Skills/Skills.MsGraph/Models/EmailMessage.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Models/EmailMessage.cs index 0b9a146741ca..939f14fc6f3e 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Models/EmailMessage.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Models/EmailMessage.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; -namespace Microsoft.SemanticKernel.Skills.MsGraph.Models; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Models; /// /// Model for an email message. diff --git a/dotnet/src/Skills/Skills.MsGraph/Models/TaskManagementTask.cs b/dotnet/src/Plugins/Plugins.MsGraph/Models/TaskManagementTask.cs similarity index 96% rename from dotnet/src/Skills/Skills.MsGraph/Models/TaskManagementTask.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Models/TaskManagementTask.cs index b8803fa869e1..1cdb5e79317b 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Models/TaskManagementTask.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Models/TaskManagementTask.cs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. -namespace Microsoft.SemanticKernel.Skills.MsGraph.Models; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Models; /// /// Model for a task in a task list. diff --git a/dotnet/src/Skills/Skills.MsGraph/Models/TaskManagementTaskList.cs b/dotnet/src/Plugins/Plugins.MsGraph/Models/TaskManagementTaskList.cs similarity index 92% rename from dotnet/src/Skills/Skills.MsGraph/Models/TaskManagementTaskList.cs rename to dotnet/src/Plugins/Plugins.MsGraph/Models/TaskManagementTaskList.cs index ff4e37c4170a..e8cea6d8ead8 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Models/TaskManagementTaskList.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/Models/TaskManagementTaskList.cs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. -namespace Microsoft.SemanticKernel.Skills.MsGraph.Models; +namespace Microsoft.SemanticKernel.Plugins.MsGraph.Models; /// /// Model for a list of tasks. diff --git a/dotnet/src/Skills/Skills.MsGraph/OrganizationHierarchySkill.cs b/dotnet/src/Plugins/Plugins.MsGraph/OrganizationHierarchyPlugin.cs similarity index 90% rename from dotnet/src/Skills/Skills.MsGraph/OrganizationHierarchySkill.cs rename to dotnet/src/Plugins/Plugins.MsGraph/OrganizationHierarchyPlugin.cs index d60fcd0b0578..13b398209c10 100644 --- a/dotnet/src/Skills/Skills.MsGraph/OrganizationHierarchySkill.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/OrganizationHierarchyPlugin.cs @@ -5,23 +5,23 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.SemanticKernel.SkillDefinition; -using Microsoft.SemanticKernel.Skills.MsGraph.Diagnostics; +using Microsoft.SemanticKernel.Plugins.MsGraph.Diagnostics; -namespace Microsoft.SemanticKernel.Skills.MsGraph; +namespace Microsoft.SemanticKernel.Plugins.MsGraph; /// /// Organizational Hierarchy skill. /// Provides methods to get information about the organization hierarchy, such as direct reports and manager details. /// -public sealed class OrganizationHierarchySkill +public sealed class OrganizationHierarchyPlugin { private readonly IOrganizationHierarchyConnector _connector; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The connector to be used for fetching organization hierarchy data. - public OrganizationHierarchySkill(IOrganizationHierarchyConnector connector) + public OrganizationHierarchyPlugin(IOrganizationHierarchyConnector connector) { Ensure.NotNull(connector, nameof(connector)); diff --git a/dotnet/src/Skills/Skills.MsGraph/Skills.MsGraph.csproj b/dotnet/src/Plugins/Plugins.MsGraph/Plugins.MsGraph.csproj similarity index 73% rename from dotnet/src/Skills/Skills.MsGraph/Skills.MsGraph.csproj rename to dotnet/src/Plugins/Plugins.MsGraph/Plugins.MsGraph.csproj index fb6116695520..52004dbd4c09 100644 --- a/dotnet/src/Skills/Skills.MsGraph/Skills.MsGraph.csproj +++ b/dotnet/src/Plugins/Plugins.MsGraph/Plugins.MsGraph.csproj @@ -2,7 +2,7 @@ - Microsoft.SemanticKernel.Skills.MsGraph + Microsoft.SemanticKernel.Plugins.MsGraph $(AssemblyName) netstandard2.0 @@ -11,8 +11,8 @@ - Semantic Kernel - Microsoft Graph Connector - Semantic Kernel Microsoft Graph Skill: access your tenant data, schedule meetings, send emails, etc. + Semantic Kernel - Microsoft Graph Plugins + Semantic Kernel Microsoft Graph Plugins: access your tenant data, schedule meetings, send emails, etc. diff --git a/dotnet/src/Skills/Skills.MsGraph/TaskListSkill.cs b/dotnet/src/Plugins/Plugins.MsGraph/TaskListPlugin.cs similarity index 90% rename from dotnet/src/Skills/Skills.MsGraph/TaskListSkill.cs rename to dotnet/src/Plugins/Plugins.MsGraph/TaskListPlugin.cs index f5c8191b9a53..d2581c83225b 100644 --- a/dotnet/src/Skills/Skills.MsGraph/TaskListSkill.cs +++ b/dotnet/src/Plugins/Plugins.MsGraph/TaskListPlugin.cs @@ -10,15 +10,15 @@ using Microsoft.Extensions.Logging.Abstractions; using Microsoft.SemanticKernel.Orchestration; using Microsoft.SemanticKernel.SkillDefinition; -using Microsoft.SemanticKernel.Skills.MsGraph.Diagnostics; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph.Diagnostics; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; -namespace Microsoft.SemanticKernel.Skills.MsGraph; +namespace Microsoft.SemanticKernel.Plugins.MsGraph; /// /// Task list skill (e.g. Microsoft To-Do) /// -public sealed class TaskListSkill +public sealed class TaskListPlugin { /// /// parameter names. @@ -40,16 +40,16 @@ public static class Parameters private readonly ILogger _logger; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Task list connector. /// The to use for logging. If null, no logging will be performed. - public TaskListSkill(ITaskManagementConnector connector, ILoggerFactory? loggerFactory = null) + public TaskListPlugin(ITaskManagementConnector connector, ILoggerFactory? loggerFactory = null) { Ensure.NotNull(connector, nameof(connector)); this._connector = connector; - this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(TaskListSkill)) : NullLogger.Instance; + this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(TaskListPlugin)) : NullLogger.Instance; } /// diff --git a/dotnet/src/Plugins/Plugins.UnitTests/.editorconfig b/dotnet/src/Plugins/Plugins.UnitTests/.editorconfig new file mode 100644 index 000000000000..bdc7915833da --- /dev/null +++ b/dotnet/src/Plugins/Plugins.UnitTests/.editorconfig @@ -0,0 +1,6 @@ +# Suppressing errors for Test projects under dotnet folder +[*.cs] +dotnet_diagnostic.CA2007.severity = none # Do not directly await a Task +dotnet_diagnostic.VSTHRD111.severity = none # Use .ConfigureAwait(bool) is hidden by default, set to none to prevent IDE from changing on autosave +dotnet_diagnostic.CS1591.severity = none # Missing XML comment for publicly visible type or member + diff --git a/dotnet/src/Skills/Skills.UnitTests/Core/FileIOSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/Core/FileIOPluginTests.cs similarity index 82% rename from dotnet/src/Skills/Skills.UnitTests/Core/FileIOSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/Core/FileIOPluginTests.cs index b66c28c0a42d..134ded8df056 100644 --- a/dotnet/src/Skills/Skills.UnitTests/Core/FileIOSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/Core/FileIOPluginTests.cs @@ -4,18 +4,18 @@ using System.IO; using System.Threading.Tasks; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using Xunit; -namespace SemanticKernel.Skills.UnitTests.Core; +namespace SemanticKernel.Plugins.UnitTests.Core; -public class FileIOSkillTests +public class FileIOPluginTests { [Fact] public void ItCanBeInstantiated() { // Act - Assert no exception occurs - _ = new FileIOSkill(); + _ = new FileIOPlugin(); } [Fact] @@ -25,14 +25,14 @@ public void ItCanBeImported() var kernel = Kernel.Builder.Build(); // Act - Assert no exception occurs e.g. due to reflection - _ = kernel.ImportSkill(new FileIOSkill(), "fileIO"); + _ = kernel.ImportSkill(new FileIOPlugin(), "fileIO"); } [Fact] public async Task ItCanReadAsync() { // Arrange - var skill = new FileIOSkill(); + var skill = new FileIOPlugin(); var path = Path.GetTempFileName(); File.WriteAllText(path, "hello world"); @@ -47,7 +47,7 @@ public async Task ItCanReadAsync() public async Task ItCannotReadAsync() { // Arrange - var skill = new FileIOSkill(); + var skill = new FileIOPlugin(); var path = Path.GetTempFileName(); File.Delete(path); @@ -65,7 +65,7 @@ Task Fn() public async Task ItCanWriteAsync() { // Arrange - var skill = new FileIOSkill(); + var skill = new FileIOPlugin(); var path = Path.GetTempFileName(); // Act @@ -79,7 +79,7 @@ public async Task ItCanWriteAsync() public async Task ItCannotWriteAsync() { // Arrange - var skill = new FileIOSkill(); + var skill = new FileIOPlugin(); var path = Path.GetTempFileName(); File.SetAttributes(path, FileAttributes.ReadOnly); diff --git a/dotnet/src/Skills/Skills.UnitTests/Core/HttpSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/Core/HttpPluginTests.cs similarity index 90% rename from dotnet/src/Skills/Skills.UnitTests/Core/HttpSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/Core/HttpPluginTests.cs index fb99493fcd73..8989252f3734 100644 --- a/dotnet/src/Skills/Skills.UnitTests/Core/HttpSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/Core/HttpPluginTests.cs @@ -6,14 +6,14 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using Moq; using Moq.Protected; using Xunit; -namespace SemanticKernel.Skills.UnitTests.Core; +namespace SemanticKernel.Plugins.UnitTests.Core; -public class HttpSkillTests : IDisposable +public class HttpPluginTests : IDisposable { private readonly string _content = "hello world"; private readonly string _uriString = "http://www.example.com"; @@ -28,7 +28,7 @@ public class HttpSkillTests : IDisposable public void ItCanBeInstantiated() { // Act - Assert no exception occurs - var skill = new HttpSkill(); + var skill = new HttpPlugin(); } [Fact] @@ -36,7 +36,7 @@ public void ItCanBeImported() { // Arrange var kernel = KernelBuilder.Create(); - var skill = new HttpSkill(); + var skill = new HttpPlugin(); // Act - Assert no exception occurs e.g. due to reflection kernel.ImportSkill(skill, "http"); @@ -48,7 +48,7 @@ public async Task ItCanGetAsync() // Arrange var mockHandler = this.CreateMock(); using var client = new HttpClient(mockHandler.Object); - var skill = new HttpSkill(client); + var skill = new HttpPlugin(client); // Act var result = await skill.GetAsync(this._uriString); @@ -64,7 +64,7 @@ public async Task ItCanPostAsync() // Arrange var mockHandler = this.CreateMock(); using var client = new HttpClient(mockHandler.Object); - var skill = new HttpSkill(client); + var skill = new HttpPlugin(client); // Act var result = await skill.PostAsync(this._uriString, this._content); @@ -80,7 +80,7 @@ public async Task ItCanPutAsync() // Arrange var mockHandler = this.CreateMock(); using var client = new HttpClient(mockHandler.Object); - var skill = new HttpSkill(client); + var skill = new HttpPlugin(client); // Act var result = await skill.PutAsync(this._uriString, this._content); @@ -96,7 +96,7 @@ public async Task ItCanDeleteAsync() // Arrange var mockHandler = this.CreateMock(); using var client = new HttpClient(mockHandler.Object); - var skill = new HttpSkill(client); + var skill = new HttpPlugin(client); // Act var result = await skill.DeleteAsync(this._uriString); diff --git a/dotnet/src/Skills/Skills.UnitTests/Core/MathSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/Core/MathPluginTests.cs similarity index 91% rename from dotnet/src/Skills/Skills.UnitTests/Core/MathSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/Core/MathPluginTests.cs index 1fd49ce76594..e4929772f646 100644 --- a/dotnet/src/Skills/Skills.UnitTests/Core/MathSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/Core/MathPluginTests.cs @@ -3,19 +3,19 @@ using System; using System.Threading.Tasks; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using SemanticKernel.UnitTests; using Xunit; -namespace SemanticKernel.Skills.UnitTests.Core; +namespace SemanticKernel.Plugins.UnitTests.Core; -public class MathSkillTests +public class MathPluginTests { [Fact] public void ItCanBeInstantiated() { // Act - Assert no exception occurs - var _ = new MathSkill(); + var _ = new MathPlugin(); } [Fact] @@ -25,7 +25,7 @@ public void ItCanBeImported() var kernel = Kernel.Builder.Build(); // Act - Assert no exception occurs e.g. due to reflection - kernel.ImportSkill(new MathSkill(), "math"); + kernel.ImportSkill(new MathPlugin(), "math"); } [Theory] @@ -40,7 +40,7 @@ public void ItCanBeImported() public async Task AddWhenValidParametersShouldSucceedAsync(string initialValue, string amount, string expectedResult) { // Arrange - var target = new MathSkill(); + var target = new MathPlugin(); // Act var context = await FunctionHelpers.CallViaKernel(target, "Add", ("input", initialValue), ("amount", amount)); @@ -61,7 +61,7 @@ public async Task AddWhenValidParametersShouldSucceedAsync(string initialValue, public async Task SubtractWhenValidParametersShouldSucceedAsync(string initialValue, string amount, string expectedResult) { // Arrange - var target = new MathSkill(); + var target = new MathPlugin(); // Act var context = await FunctionHelpers.CallViaKernel(target, "Subtract", ("input", initialValue), ("amount", amount)); // Assert @@ -85,7 +85,7 @@ public async Task SubtractWhenValidParametersShouldSucceedAsync(string initialVa public async Task AddWhenInvalidInitialValueShouldThrowAsync(string initialValue) { // Arrange - var target = new MathSkill(); + var target = new MathPlugin(); // Act var ex = await Assert.ThrowsAsync(() => FunctionHelpers.CallViaKernel(target, "Add", ("input", initialValue), ("amount", "1"))); @@ -109,7 +109,7 @@ public async Task AddWhenInvalidInitialValueShouldThrowAsync(string initialValue public async Task AddWhenInvalidAmountShouldThrowAsync(string amount) { // Arrange - var target = new MathSkill(); + var target = new MathPlugin(); // Act var ex = await Assert.ThrowsAsync(() => FunctionHelpers.CallViaKernel(target, "Add", ("input", "1"), ("amount", amount))); @@ -133,7 +133,7 @@ public async Task AddWhenInvalidAmountShouldThrowAsync(string amount) public async Task SubtractWhenInvalidInitialValueShouldThrowAsync(string initialValue) { // Arrange - var target = new MathSkill(); + var target = new MathPlugin(); // Act var ex = await Assert.ThrowsAsync(() => FunctionHelpers.CallViaKernel(target, "Subtract", ("input", initialValue), ("amount", "1"))); @@ -157,7 +157,7 @@ public async Task SubtractWhenInvalidInitialValueShouldThrowAsync(string initial public async Task SubtractAsyncWhenInvalidAmountShouldThrowAsync(string amount) { // Arrange - var target = new MathSkill(); + var target = new MathPlugin(); // Act var ex = await Assert.ThrowsAsync(() => FunctionHelpers.CallViaKernel(target, "Subtract", ("input", "1"), ("amount", amount))); diff --git a/dotnet/src/Skills/Skills.UnitTests/Core/TextSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/Core/TextPluginTests.cs similarity index 83% rename from dotnet/src/Skills/Skills.UnitTests/Core/TextSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/Core/TextPluginTests.cs index 8a0f6f5af3f8..d65b1ca51d4c 100644 --- a/dotnet/src/Skills/Skills.UnitTests/Core/TextSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/Core/TextPluginTests.cs @@ -1,18 +1,18 @@ // Copyright (c) Microsoft. All rights reserved. using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using Xunit; -namespace SemanticKernel.Skills.UnitTests.Core; +namespace SemanticKernel.Plugins.UnitTests.Core; -public class TextSkillTests +public class TextPluginTests { [Fact] public void ItCanBeInstantiated() { // Act - Assert no exception occurs - var _ = new TextSkill(); + var _ = new TextPlugin(); } [Fact] @@ -22,14 +22,14 @@ public void ItCanBeImported() var kernel = Kernel.Builder.Build(); // Act - Assert no exception occurs e.g. due to reflection - kernel.ImportSkill(new TextSkill(), "text"); + kernel.ImportSkill(new TextPlugin(), "text"); } [Fact] public void ItCanTrim() { // Arrange - var skill = new TextSkill(); + var skill = new TextPlugin(); // Act var result = skill.Trim(" hello world "); @@ -42,7 +42,7 @@ public void ItCanTrim() public void ItCanTrimStart() { // Arrange - var skill = new TextSkill(); + var skill = new TextPlugin(); // Act var result = skill.TrimStart(" hello world "); @@ -55,7 +55,7 @@ public void ItCanTrimStart() public void ItCanTrimEnd() { // Arrange - var skill = new TextSkill(); + var skill = new TextPlugin(); // Act var result = skill.TrimEnd(" hello world "); @@ -68,7 +68,7 @@ public void ItCanTrimEnd() public void ItCanUppercase() { // Arrange - var skill = new TextSkill(); + var skill = new TextPlugin(); // Act var result = skill.Uppercase("hello world"); @@ -81,7 +81,7 @@ public void ItCanUppercase() public void ItCanLowercase() { // Arrange - var skill = new TextSkill(); + var skill = new TextPlugin(); // Act var result = skill.Lowercase("HELLO WORLD"); @@ -101,7 +101,7 @@ public void ItCanLowercase() public void ItCanLength(string textToLength, int expectedLength) { // Arrange - var target = new TextSkill(); + var target = new TextPlugin(); // Act var result = target.Length(textToLength); @@ -121,7 +121,7 @@ public void ItCanLength(string textToLength, int expectedLength) public void ItCanConcat(string textToConcat, string text2ToConcat) { // Arrange - var target = new TextSkill(); + var target = new TextPlugin(); var expected = string.Concat(textToConcat, text2ToConcat); // Act diff --git a/dotnet/src/Skills/Skills.UnitTests/Core/TimeSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/Core/TimePluginTests.cs similarity index 87% rename from dotnet/src/Skills/Skills.UnitTests/Core/TimeSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/Core/TimePluginTests.cs index ac3286410fea..f245ce23fb3b 100644 --- a/dotnet/src/Skills/Skills.UnitTests/Core/TimeSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/Core/TimePluginTests.cs @@ -5,20 +5,20 @@ using System.Globalization; using System.Threading.Tasks; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using SemanticKernel.UnitTests; using Xunit; -namespace SemanticKernel.Skills.UnitTests.Core; +namespace SemanticKernel.Plugins.UnitTests.Core; // TODO: allow clock injection and test all functions -public class TimeSkillTests +public class TimePluginTests { [Fact] public void ItCanBeInstantiated() { // Act - Assert no exception occurs - var _ = new TimeSkill(); + var _ = new TimePlugin(); } [Fact] @@ -28,7 +28,7 @@ public void ItCanBeImported() var kernel = Kernel.Builder.Build(); // Act - Assert no exception occurs e.g. due to reflection - kernel.ImportSkill(new TimeSkill(), "time"); + kernel.ImportSkill(new TimePlugin(), "time"); } [Fact] @@ -36,7 +36,7 @@ public void DaysAgo() { double interval = 2; DateTime expected = DateTime.Now.AddDays(-interval); - var skill = new TimeSkill(); + var skill = new TimePlugin(); string result = skill.DaysAgo(interval, CultureInfo.CurrentCulture); DateTime returned = DateTime.Parse(result, CultureInfo.CurrentCulture); Assert.Equal(expected.Day, returned.Day); @@ -48,7 +48,7 @@ public void DaysAgo() public void Day() { string expected = DateTime.Now.ToString("dd", CultureInfo.CurrentCulture); - var skill = new TimeSkill(); + var skill = new TimePlugin(); string result = skill.Day(CultureInfo.CurrentCulture); Assert.Equal(expected, result); Assert.True(int.TryParse(result, out _)); @@ -57,7 +57,7 @@ public void Day() [Fact] public async Task LastMatchingDayBadInput() { - var skill = new TimeSkill(); + var skill = new TimePlugin(); var ex = await Assert.ThrowsAsync(() => FunctionHelpers.CallViaKernel(skill, "DateMatchingLastDayName", ("input", "not a day name"))); @@ -78,7 +78,7 @@ public void LastMatchingDay(DayOfWeek dayName) bool found = date.DayOfWeek == dayName; Assert.True(found); - var skill = new TimeSkill(); + var skill = new TimePlugin(); string result = skill.DateMatchingLastDayName(dayName, CultureInfo.CurrentCulture); DateTime returned = DateTime.Parse(result, CultureInfo.CurrentCulture); Assert.Equal(date.Day, returned.Day); diff --git a/dotnet/src/Skills/Skills.UnitTests/Core/WaitSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/Core/WaitPluginTests.cs similarity index 80% rename from dotnet/src/Skills/Skills.UnitTests/Core/WaitSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/Core/WaitPluginTests.cs index 36eafb7d9f73..8ac7afbdf87d 100644 --- a/dotnet/src/Skills/Skills.UnitTests/Core/WaitSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/Core/WaitPluginTests.cs @@ -3,21 +3,21 @@ using System; using System.Threading.Tasks; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Core; +using Microsoft.SemanticKernel.Plugins.Core; using Moq; using SemanticKernel.UnitTests; using Xunit; -namespace SemanticKernel.Skills.UnitTests.Core; +namespace SemanticKernel.Plugins.UnitTests.Core; // TODO: allow clock injection and test all functions -public class WaitSkillTests +public class WaitPluginTests { [Fact] public void ItCanBeInstantiated() { // Act - Assert no exception occurs - var _ = new WaitSkill(); + var _ = new WaitPlugin(); } [Fact] @@ -27,7 +27,7 @@ public void ItCanBeImported() var kernel = Kernel.Builder.Build(); // Act - Assert no exception occurs e.g. due to reflection - kernel.ImportSkill(new WaitSkill(), "wait"); + kernel.ImportSkill(new WaitPlugin(), "wait"); } [Theory] @@ -43,8 +43,8 @@ public void ItCanBeImported() public async Task ItWaitSecondsWhenValidParametersSucceedAsync(string textSeconds, int expectedMilliseconds) { // Arrange - var waitProviderMock = new Mock(); - var target = new WaitSkill(waitProviderMock.Object); + var waitProviderMock = new Mock(); + var target = new WaitPlugin(waitProviderMock.Object); // Act var context = await FunctionHelpers.CallViaKernel(target, "Seconds", ("input", textSeconds)); @@ -68,8 +68,8 @@ public async Task ItWaitSecondsWhenValidParametersSucceedAsync(string textSecond public async Task ItWaitSecondsWhenInvalidParametersFailsAsync(string textSeconds) { // Arrange - var waitProviderMock = new Mock(); - var target = new WaitSkill(waitProviderMock.Object); + var waitProviderMock = new Mock(); + var target = new WaitPlugin(waitProviderMock.Object); // Act var ex = await Assert.ThrowsAsync(() => FunctionHelpers.CallViaKernel(target, "Seconds", ("input", textSeconds))); diff --git a/dotnet/src/Skills/Skills.UnitTests/Document/DocumentSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/Document/DocumentPluginTests.cs similarity index 87% rename from dotnet/src/Skills/Skills.UnitTests/Document/DocumentSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/Document/DocumentPluginTests.cs index cd6cb8c11698..72853fad55b2 100644 --- a/dotnet/src/Skills/Skills.UnitTests/Document/DocumentSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/Document/DocumentPluginTests.cs @@ -4,14 +4,14 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -using Microsoft.SemanticKernel.Skills.Document; -using Microsoft.SemanticKernel.Skills.Document.FileSystem; +using Microsoft.SemanticKernel.Plugins.Document; +using Microsoft.SemanticKernel.Plugins.Document.FileSystem; using Moq; using Xunit; -namespace SemanticKernel.Skills.UnitTests.Document; +namespace SemanticKernel.Plugins.UnitTests.Document; -public class DocumentSkillTests +public class DocumentPluginTests { [Fact] public async Task ReadTextAsyncSucceedsAsync() @@ -31,7 +31,7 @@ public async Task ReadTextAsyncSucceedsAsync() .Setup(mock => mock.ReadText(It.IsAny())) .Returns(expectedText); - var target = new DocumentSkill(documentConnectorMock.Object, fileSystemConnectorMock.Object); + var target = new DocumentPlugin(documentConnectorMock.Object, fileSystemConnectorMock.Object); // Act string actual = await target.ReadTextAsync(anyFilePath); @@ -63,7 +63,7 @@ public async Task AppendTextAsyncFileExistsSucceedsAsync() documentConnectorMock .Setup(mock => mock.AppendText(It.IsAny(), It.Is(text => text.Equals(anyText, StringComparison.Ordinal)))); - var target = new DocumentSkill(documentConnectorMock.Object, fileSystemConnectorMock.Object); + var target = new DocumentPlugin(documentConnectorMock.Object, fileSystemConnectorMock.Object); // Act await target.AppendTextAsync(anyText, anyFilePath); @@ -96,7 +96,7 @@ public async Task AppendTextAsyncFileDoesNotExistSucceedsAsync() documentConnectorMock .Setup(mock => mock.AppendText(It.IsAny(), It.Is(text => text.Equals(anyText, StringComparison.Ordinal)))); - var target = new DocumentSkill(documentConnectorMock.Object, fileSystemConnectorMock.Object); + var target = new DocumentPlugin(documentConnectorMock.Object, fileSystemConnectorMock.Object); // Act await target.AppendTextAsync(anyText, anyFilePath); @@ -115,7 +115,7 @@ public async Task AppendTextAsyncNoFilePathFailsAsync() var fileSystemConnectorMock = new Mock(); var documentConnectorMock = new Mock(); - var target = new DocumentSkill(documentConnectorMock.Object, fileSystemConnectorMock.Object); + var target = new DocumentPlugin(documentConnectorMock.Object, fileSystemConnectorMock.Object); // Act/Assert await Assert.ThrowsAnyAsync(() => diff --git a/dotnet/src/Skills/Skills.UnitTests/MsGraph/CalendarSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/MsGraph/CalendarPluginTests.cs similarity index 93% rename from dotnet/src/Skills/Skills.UnitTests/MsGraph/CalendarSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/MsGraph/CalendarPluginTests.cs index 6cebd0ab1a7e..9f57663327c6 100644 --- a/dotnet/src/Skills/Skills.UnitTests/MsGraph/CalendarSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/MsGraph/CalendarPluginTests.cs @@ -5,15 +5,15 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.SemanticKernel.Diagnostics; -using Microsoft.SemanticKernel.Skills.MsGraph; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; using Moq; using SemanticKernel.UnitTests; using Xunit; -namespace SemanticKernel.Skills.UnitTests.MsGraph; +namespace SemanticKernel.Plugins.UnitTests.MsGraph; -public class CalendarSkillTests +public class CalendarPluginTests { [Fact] public async Task AddEventAsyncSucceedsAsync() @@ -37,7 +37,7 @@ public async Task AddEventAsyncSucceedsAsync() connectorMock.Setup(c => c.AddEventAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(expected); - CalendarSkill target = new(connectorMock.Object); + CalendarPlugin target = new(connectorMock.Object); // Act var context = await FunctionHelpers.CallViaKernel(target, "AddEvent", @@ -75,7 +75,7 @@ public async Task AddEventAsyncWithoutLocationSucceedsAsync() connectorMock.Setup(c => c.AddEventAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(expected); - CalendarSkill target = new(connectorMock.Object); + CalendarPlugin target = new(connectorMock.Object); // Act var context = await FunctionHelpers.CallViaKernel(target, "AddEvent", @@ -112,7 +112,7 @@ public async Task AddEventAsyncWithoutContentSucceedsAsync() connectorMock.Setup(c => c.AddEventAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(expected); - CalendarSkill target = new(connectorMock.Object); + CalendarPlugin target = new(connectorMock.Object); // Act var context = await FunctionHelpers.CallViaKernel(target, "AddEvent", @@ -149,7 +149,7 @@ public async Task AddEventAsyncWithoutAttendeesSucceedsAsync() connectorMock.Setup(c => c.AddEventAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(expected); - CalendarSkill target = new(connectorMock.Object); + CalendarPlugin target = new(connectorMock.Object); // Act var context = await FunctionHelpers.CallViaKernel(target, "AddEvent", @@ -175,7 +175,7 @@ public async Task AddEventAsyncWithoutStartFailsAsync() Mock connectorMock = new(); - CalendarSkill target = new(connectorMock.Object); + CalendarPlugin target = new(connectorMock.Object); // Act and Assert await Assert.ThrowsAsync(() => FunctionHelpers.CallViaKernel(target, "AddEvent", @@ -199,7 +199,7 @@ public async Task AddEventAsyncWithoutEndFailsAsync() Mock connectorMock = new(); - CalendarSkill target = new(connectorMock.Object); + CalendarPlugin target = new(connectorMock.Object); // Act await Assert.ThrowsAsync(() => FunctionHelpers.CallViaKernel(target, "AddEvent", @@ -223,7 +223,7 @@ public async Task AddEventAsyncWithoutSubjectFailsAsync() Mock connectorMock = new(); - CalendarSkill target = new(connectorMock.Object); + CalendarPlugin target = new(connectorMock.Object); // Act var ex = await Assert.ThrowsAsync(() => FunctionHelpers.CallViaKernel(target, "AddEvent", diff --git a/dotnet/src/Skills/Skills.UnitTests/MsGraph/CloudDriveSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/MsGraph/CloudDrivePluginTests.cs similarity index 86% rename from dotnet/src/Skills/Skills.UnitTests/MsGraph/CloudDriveSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/MsGraph/CloudDrivePluginTests.cs index 811266e49183..389c72663239 100644 --- a/dotnet/src/Skills/Skills.UnitTests/MsGraph/CloudDriveSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/MsGraph/CloudDrivePluginTests.cs @@ -5,13 +5,13 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -using Microsoft.SemanticKernel.Skills.MsGraph; +using Microsoft.SemanticKernel.Plugins.MsGraph; using Moq; using Xunit; -namespace SemanticKernel.Skills.UnitTests.MsGraph; +namespace SemanticKernel.Plugins.UnitTests.MsGraph; -public class CloudDriveSkillTests +public class CloudDrivePluginTests { [Fact] public async Task UploadSmallFileAsyncSucceedsAsync() @@ -23,7 +23,7 @@ public async Task UploadSmallFileAsyncSucceedsAsync() connectorMock.Setup(c => c.UploadSmallFileAsync(It.IsAny(), It.IsAny(), It.IsAny())) .Returns(Task.CompletedTask); - CloudDriveSkill target = new(connectorMock.Object); + CloudDrivePlugin target = new(connectorMock.Object); // Act await target.UploadFileAsync(anyFilePath, Guid.NewGuid().ToString()); @@ -43,7 +43,7 @@ public async Task CreateLinkAsyncSucceedsAsync() connectorMock.Setup(c => c.CreateShareLinkAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .ReturnsAsync(anyLink); - CloudDriveSkill target = new(connectorMock.Object); + CloudDrivePlugin target = new(connectorMock.Object); // Act string actual = await target.CreateLinkAsync(anyFilePath); @@ -65,7 +65,7 @@ public async Task GetFileContentAsyncSucceedsAsync() connectorMock.Setup(c => c.GetFileContentStreamAsync(It.IsAny(), It.IsAny())) .ReturnsAsync(expectedStream); - CloudDriveSkill target = new(connectorMock.Object); + CloudDrivePlugin target = new(connectorMock.Object); // Act string actual = await target.GetFileContentAsync(anyFilePath); diff --git a/dotnet/src/Skills/Skills.UnitTests/MsGraph/EmailSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/MsGraph/EmailPluginTests.cs similarity index 86% rename from dotnet/src/Skills/Skills.UnitTests/MsGraph/EmailSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/MsGraph/EmailPluginTests.cs index 6b0c064d93d3..f2f27419b2ea 100644 --- a/dotnet/src/Skills/Skills.UnitTests/MsGraph/EmailSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/MsGraph/EmailPluginTests.cs @@ -3,13 +3,13 @@ using System; using System.Threading; using System.Threading.Tasks; -using Microsoft.SemanticKernel.Skills.MsGraph; +using Microsoft.SemanticKernel.Plugins.MsGraph; using Moq; using Xunit; -namespace SemanticKernel.Skills.UnitTests.MsGraph; +namespace SemanticKernel.Plugins.UnitTests.MsGraph; -public class EmailSkillTests +public class EmailPluginTests { [Fact] public async Task SendEmailAsyncSucceedsAsync() @@ -19,7 +19,7 @@ public async Task SendEmailAsyncSucceedsAsync() connectorMock.Setup(c => c.SendEmailAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Returns(Task.CompletedTask); - EmailSkill target = new(connectorMock.Object); + EmailPlugin target = new(connectorMock.Object); string anyContent = Guid.NewGuid().ToString(); string anySubject = Guid.NewGuid().ToString(); @@ -37,7 +37,7 @@ public async Task SendEmailAsyncNoRecipientFailsAsync() { // Arrange Mock connectorMock = new(); - EmailSkill target = new(connectorMock.Object); + EmailPlugin target = new(connectorMock.Object); string anyContent = Guid.NewGuid().ToString(); string anySubject = Guid.NewGuid().ToString(); @@ -55,7 +55,7 @@ public async Task SendEmailAsyncNoSubjectFailsAsync() { // Arrange Mock connectorMock = new(); - EmailSkill target = new(connectorMock.Object); + EmailPlugin target = new(connectorMock.Object); string anyContent = Guid.NewGuid().ToString(); string anyRecipient = Guid.NewGuid().ToString(); @@ -77,7 +77,7 @@ public async Task GetMyEmailAddressAsyncSucceedsAsync() connectorMock.Setup(c => c.GetMyEmailAddressAsync(It.IsAny())) .ReturnsAsync(anyEmailAddress); - EmailSkill target = new(connectorMock.Object); + EmailPlugin target = new(connectorMock.Object); // Act string actual = await target.GetMyEmailAddressAsync(); diff --git a/dotnet/src/Skills/Skills.UnitTests/MsGraph/OrganizationHierarchySkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/MsGraph/OrganizationHierarchyPluginTests.cs similarity index 85% rename from dotnet/src/Skills/Skills.UnitTests/MsGraph/OrganizationHierarchySkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/MsGraph/OrganizationHierarchyPluginTests.cs index 74ed40c4f1ea..9f90a5b9079c 100644 --- a/dotnet/src/Skills/Skills.UnitTests/MsGraph/OrganizationHierarchySkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/MsGraph/OrganizationHierarchyPluginTests.cs @@ -5,13 +5,13 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; -using Microsoft.SemanticKernel.Skills.MsGraph; +using Microsoft.SemanticKernel.Plugins.MsGraph; using Moq; using Xunit; -namespace SemanticKernel.Skills.UnitTests.MsGraph; +namespace SemanticKernel.Plugins.UnitTests.MsGraph; -public class OrganizationHierarchySkillTests +public class OrganizationHierarchyPluginTests { [Fact] public async Task GetMyDirectReportsEmailAsyncSucceedsAsync() @@ -20,7 +20,7 @@ public async Task GetMyDirectReportsEmailAsyncSucceedsAsync() string[] anyDirectReportsEmail = { Guid.NewGuid().ToString(), Guid.NewGuid().ToString() }; Mock connectorMock = new(); connectorMock.Setup(c => c.GetDirectReportsEmailAsync(It.IsAny())).ReturnsAsync(anyDirectReportsEmail); - OrganizationHierarchySkill target = new(connectorMock.Object); + OrganizationHierarchyPlugin target = new(connectorMock.Object); // Act string actual = await target.GetMyDirectReportsEmailAsync(); @@ -43,7 +43,7 @@ public async Task GetMyManagerEmailAsyncSucceedsAsync() string anyManagerEmail = Guid.NewGuid().ToString(); Mock connectorMock = new(); connectorMock.Setup(c => c.GetManagerEmailAsync(It.IsAny())).ReturnsAsync(anyManagerEmail); - OrganizationHierarchySkill target = new(connectorMock.Object); + OrganizationHierarchyPlugin target = new(connectorMock.Object); // Act string actual = await target.GetMyManagerEmailAsync(); @@ -60,7 +60,7 @@ public async Task GetMyManagerNameAsyncSucceedsAsync() string anyManagerName = Guid.NewGuid().ToString(); Mock connectorMock = new(); connectorMock.Setup(c => c.GetManagerNameAsync(It.IsAny())).ReturnsAsync(anyManagerName); - OrganizationHierarchySkill target = new(connectorMock.Object); + OrganizationHierarchyPlugin target = new(connectorMock.Object); // Act string actual = await target.GetMyManagerNameAsync(); diff --git a/dotnet/src/Skills/Skills.UnitTests/MsGraph/TaskListSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/MsGraph/TaskListPluginTests.cs similarity index 89% rename from dotnet/src/Skills/Skills.UnitTests/MsGraph/TaskListSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/MsGraph/TaskListPluginTests.cs index 6988f053f83b..226410ac2768 100644 --- a/dotnet/src/Skills/Skills.UnitTests/MsGraph/TaskListSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/MsGraph/TaskListPluginTests.cs @@ -3,15 +3,15 @@ using System; using System.Threading; using System.Threading.Tasks; -using Microsoft.SemanticKernel.Skills.MsGraph; -using Microsoft.SemanticKernel.Skills.MsGraph.Models; +using Microsoft.SemanticKernel.Plugins.MsGraph; +using Microsoft.SemanticKernel.Plugins.MsGraph.Models; using Moq; using Xunit; -using static Microsoft.SemanticKernel.Skills.MsGraph.TaskListSkill; +using static Microsoft.SemanticKernel.Plugins.MsGraph.TaskListPlugin; -namespace SemanticKernel.Skills.UnitTests.MsGraph; +namespace SemanticKernel.Plugins.UnitTests.MsGraph; -public class TaskListSkillTests +public class TaskListPluginTests { private readonly TaskManagementTaskList _anyTaskList = new( id: Guid.NewGuid().ToString(), @@ -37,7 +37,7 @@ public async Task AddTaskAsyncNoReminderSucceedsAsync() connectorMock.Setup(c => c.AddTaskAsync(It.IsAny(), It.IsAny(), It.IsAny())) .ReturnsAsync(this._anyTask); - TaskListSkill target = new(connectorMock.Object); + TaskListPlugin target = new(connectorMock.Object); // Act await target.AddTaskAsync(anyTitle); @@ -61,7 +61,7 @@ public async Task AddTaskAsyncWithReminderSucceedsAsync() string anyReminder = (DateTimeOffset.Now + TimeSpan.FromHours(1)).ToString("o"); - TaskListSkill target = new(connectorMock.Object); + TaskListPlugin target = new(connectorMock.Object); // Act await target.AddTaskAsync(anyTitle, anyReminder); @@ -84,7 +84,7 @@ public async Task AddTaskAsyncNoDefaultTaskListFailsAsync() string anyReminder = (DateTimeOffset.Now + TimeSpan.FromHours(1)).ToString("o"); - TaskListSkill target = new(connectorMock.Object); + TaskListPlugin target = new(connectorMock.Object); // Act/Assert await Assert.ThrowsAnyAsync(() => diff --git a/dotnet/src/Plugins/Plugins.UnitTests/Plugins.UnitTests.csproj b/dotnet/src/Plugins/Plugins.UnitTests/Plugins.UnitTests.csproj new file mode 100644 index 000000000000..1193703f92bd --- /dev/null +++ b/dotnet/src/Plugins/Plugins.UnitTests/Plugins.UnitTests.csproj @@ -0,0 +1,36 @@ + + + + SemanticKernel.Plugins.UnitTests + SemanticKernel.Plugins.UnitTests + net6.0 + LatestMajor + true + enable + disable + false + CA2007,VSTHRD111 + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + + + + diff --git a/dotnet/src/Skills/Skills.UnitTests/Web/SearchUrlSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/Web/SearchUrlSkillTests.cs similarity index 83% rename from dotnet/src/Skills/Skills.UnitTests/Web/SearchUrlSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/Web/SearchUrlSkillTests.cs index 0536c2ca67a5..76bddb28fad6 100644 --- a/dotnet/src/Skills/Skills.UnitTests/Web/SearchUrlSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/Web/SearchUrlSkillTests.cs @@ -2,12 +2,12 @@ using System.Text.Encodings.Web; using Microsoft.SemanticKernel; -using Microsoft.SemanticKernel.Skills.Web; +using Microsoft.SemanticKernel.Plugins.Web; using Xunit; -namespace SemanticKernel.Skills.UnitTests.Web; +namespace SemanticKernel.Plugins.UnitTests.Web; -public class SearchUrlSkillTests +public class SearchUrlPluginTests { private const string AnyInput = ""; private readonly string _encodedInput = UrlEncoder.Default.Encode(AnyInput); @@ -16,7 +16,7 @@ public class SearchUrlSkillTests public void ItCanBeInstantiated() { // Act - Assert no exception occurs - var _ = new SearchUrlSkill(); + var _ = new SearchUrlPlugin(); } [Fact] @@ -26,14 +26,14 @@ public void ItCanBeImported() IKernel kernel = Kernel.Builder.Build(); // Act - Assert no exception occurs e.g. due to reflection - kernel.ImportSkill(new SearchUrlSkill(), "search"); + kernel.ImportSkill(new SearchUrlPlugin(), "search"); } [Fact] public void AmazonSearchUrlSucceeds() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.AmazonSearchUrl(AnyInput); @@ -46,7 +46,7 @@ public void AmazonSearchUrlSucceeds() public void BingSearchUrlSucceeds() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.BingSearchUrl(AnyInput); @@ -59,7 +59,7 @@ public void BingSearchUrlSucceeds() public void BingImagesSearchUrlSucceeds() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.BingImagesSearchUrl(AnyInput); @@ -72,7 +72,7 @@ public void BingImagesSearchUrlSucceeds() public void BingMapsSearchUrl() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.BingMapsSearchUrl(AnyInput); @@ -85,7 +85,7 @@ public void BingMapsSearchUrl() public void BingShoppingSearchUrl() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.BingShoppingSearchUrl(AnyInput); @@ -98,7 +98,7 @@ public void BingShoppingSearchUrl() public void BingNewsSearchUrl() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.BingNewsSearchUrl(AnyInput); @@ -111,7 +111,7 @@ public void BingNewsSearchUrl() public void BingTravelSearchUrl() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.BingTravelSearchUrl(AnyInput); @@ -124,7 +124,7 @@ public void BingTravelSearchUrl() public void FacebookSearchUrl() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.FacebookSearchUrl(AnyInput); @@ -137,7 +137,7 @@ public void FacebookSearchUrl() public void GitHubSearchUrl() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.GitHubSearchUrl(AnyInput); @@ -150,7 +150,7 @@ public void GitHubSearchUrl() public void LinkedInSearchUrl() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.LinkedInSearchUrl(AnyInput); @@ -163,7 +163,7 @@ public void LinkedInSearchUrl() public void TwitterSearchUrl() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.TwitterSearchUrl(AnyInput); @@ -176,7 +176,7 @@ public void TwitterSearchUrl() public void WikipediaSearchUrl() { // Arrange - var skill = new SearchUrlSkill(); + var skill = new SearchUrlPlugin(); // Act string actual = skill.WikipediaSearchUrl(AnyInput); diff --git a/dotnet/src/Skills/Skills.UnitTests/Web/WebSearchEngineSkillTests.cs b/dotnet/src/Plugins/Plugins.UnitTests/Web/WebSearchEngineSkillTests.cs similarity index 78% rename from dotnet/src/Skills/Skills.UnitTests/Web/WebSearchEngineSkillTests.cs rename to dotnet/src/Plugins/Plugins.UnitTests/Web/WebSearchEngineSkillTests.cs index 22ebb25d08b6..e184ec3648b6 100644 --- a/dotnet/src/Skills/Skills.UnitTests/Web/WebSearchEngineSkillTests.cs +++ b/dotnet/src/Plugins/Plugins.UnitTests/Web/WebSearchEngineSkillTests.cs @@ -4,13 +4,13 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Microsoft.SemanticKernel.Skills.Web; +using Microsoft.SemanticKernel.Plugins.Web; using Moq; using Xunit; -namespace SemanticKernel.Skills.UnitTests.Web; +namespace SemanticKernel.Plugins.UnitTests.Web; -public sealed class WebSearchEngineSkillTests +public sealed class WebSearchEnginePluginTests { [Fact] public async Task SearchAsyncSucceedsAsync() @@ -22,7 +22,7 @@ public async Task SearchAsyncSucceedsAsync() connectorMock.Setup(c => c.SearchAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .ReturnsAsync(expected); - WebSearchEngineSkill target = new(connectorMock.Object); + WebSearchEnginePlugin target = new(connectorMock.Object); string anyQuery = Guid.NewGuid().ToString(); diff --git a/dotnet/src/Skills/Skills.Web/Bing/BingConnector.cs b/dotnet/src/Plugins/Plugins.Web/Bing/BingConnector.cs similarity index 99% rename from dotnet/src/Skills/Skills.Web/Bing/BingConnector.cs rename to dotnet/src/Plugins/Plugins.Web/Bing/BingConnector.cs index 4a88d0858f7b..d99672e8ea17 100644 --- a/dotnet/src/Skills/Skills.Web/Bing/BingConnector.cs +++ b/dotnet/src/Plugins/Plugins.Web/Bing/BingConnector.cs @@ -13,7 +13,7 @@ using Microsoft.Extensions.Logging.Abstractions; using Microsoft.SemanticKernel.Diagnostics; -namespace Microsoft.SemanticKernel.Skills.Web.Bing; +namespace Microsoft.SemanticKernel.Plugins.Web.Bing; /// /// Bing API connector. diff --git a/dotnet/src/Skills/Skills.Web/Google/GoogleConnector.cs b/dotnet/src/Plugins/Plugins.Web/Google/GoogleConnector.cs similarity index 98% rename from dotnet/src/Skills/Skills.Web/Google/GoogleConnector.cs rename to dotnet/src/Plugins/Plugins.Web/Google/GoogleConnector.cs index 58dcd3648d0d..079d92f27656 100644 --- a/dotnet/src/Skills/Skills.Web/Google/GoogleConnector.cs +++ b/dotnet/src/Plugins/Plugins.Web/Google/GoogleConnector.cs @@ -11,7 +11,7 @@ using Microsoft.Extensions.Logging.Abstractions; using Microsoft.SemanticKernel.Diagnostics; -namespace Microsoft.SemanticKernel.Skills.Web.Google; +namespace Microsoft.SemanticKernel.Plugins.Web.Google; /// /// Google search connector. diff --git a/dotnet/src/Skills/Skills.Web/IWebSearchEngineConnector.cs b/dotnet/src/Plugins/Plugins.Web/IWebSearchEngineConnector.cs similarity index 94% rename from dotnet/src/Skills/Skills.Web/IWebSearchEngineConnector.cs rename to dotnet/src/Plugins/Plugins.Web/IWebSearchEngineConnector.cs index e9b084d20c5e..c027c30f4058 100644 --- a/dotnet/src/Skills/Skills.Web/IWebSearchEngineConnector.cs +++ b/dotnet/src/Plugins/Plugins.Web/IWebSearchEngineConnector.cs @@ -4,7 +4,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Microsoft.SemanticKernel.Skills.Web; +namespace Microsoft.SemanticKernel.Plugins.Web; /// /// Web search engine connector interface. diff --git a/dotnet/src/Skills/Skills.Web/Skills.Web.csproj b/dotnet/src/Plugins/Plugins.Web/Plugins.Web.csproj similarity index 93% rename from dotnet/src/Skills/Skills.Web/Skills.Web.csproj rename to dotnet/src/Plugins/Plugins.Web/Plugins.Web.csproj index f0a7c1073361..feac62923118 100644 --- a/dotnet/src/Skills/Skills.Web/Skills.Web.csproj +++ b/dotnet/src/Plugins/Plugins.Web/Plugins.Web.csproj @@ -2,7 +2,7 @@ - Microsoft.SemanticKernel.Skills.Web + Microsoft.SemanticKernel.Plugins.Web $(AssemblyName) netstandard2.0 diff --git a/dotnet/src/Skills/Skills.Web/SearchUrlSkill.cs b/dotnet/src/Plugins/Plugins.Web/SearchUrlPlugin.cs similarity index 98% rename from dotnet/src/Skills/Skills.Web/SearchUrlSkill.cs rename to dotnet/src/Plugins/Plugins.Web/SearchUrlPlugin.cs index ccfbd704217f..18f98ce592b4 100644 --- a/dotnet/src/Skills/Skills.Web/SearchUrlSkill.cs +++ b/dotnet/src/Plugins/Plugins.Web/SearchUrlPlugin.cs @@ -5,13 +5,13 @@ using System.Text.Encodings.Web; using Microsoft.SemanticKernel.SkillDefinition; -namespace Microsoft.SemanticKernel.Skills.Web; +namespace Microsoft.SemanticKernel.Plugins.Web; /// /// Get search URLs for various websites /// [SuppressMessage("Design", "CA1055:URI return values should not be strings", Justification = "Semantic Kernel operates on strings")] -public sealed class SearchUrlSkill +public sealed class SearchUrlPlugin { /** * Amazon Search URLs diff --git a/dotnet/src/Skills/Skills.Web/WebFileDownloadSkill.cs b/dotnet/src/Plugins/Plugins.Web/WebFileDownloadPlugin.cs similarity index 89% rename from dotnet/src/Skills/Skills.Web/WebFileDownloadSkill.cs rename to dotnet/src/Plugins/Plugins.Web/WebFileDownloadPlugin.cs index f8d01c5d63c9..8d742ea8c26c 100644 --- a/dotnet/src/Skills/Skills.Web/WebFileDownloadSkill.cs +++ b/dotnet/src/Plugins/Plugins.Web/WebFileDownloadPlugin.cs @@ -11,12 +11,12 @@ using Microsoft.Extensions.Logging.Abstractions; using Microsoft.SemanticKernel.SkillDefinition; -namespace Microsoft.SemanticKernel.Skills.Web; +namespace Microsoft.SemanticKernel.Plugins.Web; /// /// Skill to download web files. /// -public sealed class WebFileDownloadSkill +public sealed class WebFileDownloadPlugin { /// /// Skill parameter: where to save file. @@ -27,23 +27,23 @@ public sealed class WebFileDownloadSkill private readonly HttpClient _httpClient; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The to use for logging. If null, no logging will be performed. - public WebFileDownloadSkill(ILoggerFactory? loggerFactory = null) : + public WebFileDownloadPlugin(ILoggerFactory? loggerFactory = null) : this(new HttpClient(NonDisposableHttpClientHandler.Instance, false), loggerFactory) { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The HTTP client to use for making requests. /// The to use for logging. If null, no logging will be performed. - public WebFileDownloadSkill(HttpClient httpClient, ILoggerFactory? loggerFactory = null) + public WebFileDownloadPlugin(HttpClient httpClient, ILoggerFactory? loggerFactory = null) { this._httpClient = httpClient; - this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(WebFileDownloadSkill)) : NullLogger.Instance; + this._logger = loggerFactory is not null ? loggerFactory.CreateLogger(typeof(WebFileDownloadPlugin)) : NullLogger.Instance; } /// diff --git a/dotnet/src/Skills/Skills.Web/WebSearchEngineSkill.cs b/dotnet/src/Plugins/Plugins.Web/WebSearchEnginePlugin.cs similarity index 92% rename from dotnet/src/Skills/Skills.Web/WebSearchEngineSkill.cs rename to dotnet/src/Plugins/Plugins.Web/WebSearchEnginePlugin.cs index 49156c4bc2df..c177a94e45ac 100644 --- a/dotnet/src/Skills/Skills.Web/WebSearchEngineSkill.cs +++ b/dotnet/src/Plugins/Plugins.Web/WebSearchEnginePlugin.cs @@ -8,12 +8,12 @@ using System.Threading.Tasks; using Microsoft.SemanticKernel.SkillDefinition; -namespace Microsoft.SemanticKernel.Skills.Web; +namespace Microsoft.SemanticKernel.Plugins.Web; /// /// Web search engine skill (e.g. Bing). /// -public sealed class WebSearchEngineSkill +public sealed class WebSearchEnginePlugin { /// /// The count parameter name. @@ -28,10 +28,10 @@ public sealed class WebSearchEngineSkill private readonly IWebSearchEngineConnector _connector; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The web search engine connector. - public WebSearchEngineSkill(IWebSearchEngineConnector connector) + public WebSearchEnginePlugin(IWebSearchEngineConnector connector) { this._connector = connector; } diff --git a/dotnet/src/SemanticKernel.MetaPackage/SemanticKernel.MetaPackage.csproj b/dotnet/src/SemanticKernel.MetaPackage/SemanticKernel.MetaPackage.csproj index f030dcf527cd..d7fc20d7a6d4 100644 --- a/dotnet/src/SemanticKernel.MetaPackage/SemanticKernel.MetaPackage.csproj +++ b/dotnet/src/SemanticKernel.MetaPackage/SemanticKernel.MetaPackage.csproj @@ -16,7 +16,7 @@ Empowers app owners to integrate cutting-edge LLM technology quickly and easily - + diff --git a/dotnet/src/Skills/Skills.UnitTests/Skills.UnitTests.csproj b/dotnet/src/Skills/Skills.UnitTests/Skills.UnitTests.csproj index c449a27e0126..fb53e2ced2c2 100644 --- a/dotnet/src/Skills/Skills.UnitTests/Skills.UnitTests.csproj +++ b/dotnet/src/Skills/Skills.UnitTests/Skills.UnitTests.csproj @@ -42,12 +42,8 @@ - - - - diff --git a/samples/apps/chat-summary-webapp-react/README.md b/samples/apps/chat-summary-webapp-react/README.md index b4c7aa39b2ea..8f66736580e5 100644 --- a/samples/apps/chat-summary-webapp-react/README.md +++ b/samples/apps/chat-summary-webapp-react/README.md @@ -26,8 +26,8 @@ Watch the [Chat Summary Quick Start Video](https://aka.ms/SK-Samples-SimChat-Vid The Simple Chat Summary sample allows you to see the power of semantic functions used in a chat. -The sample highlights the [SummarizeConversation](../../../dotnet/src/Skills/Skills.Core/SemanticFunctionConstants.cs#7), [GetConversationActionItems](../../../dotnet/src/Skills/Skills.Core/SemanticFunctionConstants.cs#20), and [GetConversationTopics](../../../dotnet/src/Skills/Skills.Core/SemanticFunctionConstants.cs#63) -native functions in the [Conversation Summary Skill](../../../dotnet/src/Skills//Skills.Core/ConversationSummarySkill.cs). +The sample highlights the [SummarizeConversation](../../../dotnet/src/Plugins/Plugins.Core/SemanticFunctionConstants.cs#7), [GetConversationActionItems](../../../dotnet/src/Plugins/Plugins.Core/SemanticFunctionConstants.cs#20), and [GetConversationTopics](../../../dotnet/src/Plugins/Plugins.Core/SemanticFunctionConstants.cs#63) +native functions in the [Conversation Summary Skill](../../../dotnet/src/Plugins/Plugins.Core/ConversationSummaryPlugin.cs). Each function calls Open AI to review the information in the chat window and produces insights. The chat data can be loaded from this [data file](src/components/chat/ChatThread.ts) – which you diff --git a/samples/apps/chat-summary-webapp-react/src/App.tsx b/samples/apps/chat-summary-webapp-react/src/App.tsx index d0fcd6f0548d..ba2bf2b30924 100644 --- a/samples/apps/chat-summary-webapp-react/src/App.tsx +++ b/samples/apps/chat-summary-webapp-react/src/App.tsx @@ -63,15 +63,15 @@ const App: FC = () => { items: [ { title: 'Summarize', - uri: 'https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Skills/Skills.Core/ConversationSummarySkill.cs#L70', + uri: 'https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Plugins/Plugins.Core/ConversationSummarySkill.cs#L70', }, { title: 'Action Items', - uri: 'https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Skills/Skills.Core/ConversationSummarySkill.cs#L87', + uri: 'https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Plugins/Plugins.Core/ConversationSummarySkill.cs#L87', }, { title: 'Topics', - uri: 'https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Skills/Skills.Core/ConversationSummarySkill.cs#L104', + uri: 'https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Plugins/Plugins.Core/ConversationSummarySkill.cs#L104', }, ], },