.Net: Extract template engine from Kernel.Core (#2562)

### Motivation and Context

1. Why is this change required? This is part of the work to extract
functionality from Semantic Kernel core prior to 1.0 release.
2. What problem does it solve? Provides a pattern to follow for
additional template engine implementations.
3. What scenario does it contribute to? Contributes to the goal of
reducing the Semantic Kernel core to focus on AI orchestration.
4. If it fixes an open issue, please link to the issue here.
https://github.com/microsoft/semantic-kernel/issues/2527

### Description

- Create new template engine project in the extensions folder
- Move template engine code from semantic kernel abstractions and core
- Refactor `IPromptTemplateEngine` so that it doesn't depend on details
of the default implementation
- Refactor `PromptTemplateEngine` to match the new interface definition
- Move template engine unit tests to the extensions unit tests project

### 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
- [x] I didn't break anyone 😄
This commit is contained in:
Mark Wallace
2023-08-29 08:50:11 +00:00
committed by GitHub
parent 013abb79b6
commit 562d73c6cf
38 changed files with 218 additions and 93 deletions
@@ -41,6 +41,7 @@
<ProjectReference Include="..\..\src\Extensions\Planning.SequentialPlanner\Planning.SequentialPlanner.csproj" />
<ProjectReference Include="..\..\src\Extensions\Planning.StepwisePlanner\Planning.StepwisePlanner.csproj" />
<ProjectReference Include="..\..\src\Connectors\Connectors.Memory.Pinecone\Connectors.Memory.Pinecone.csproj" />
<ProjectReference Include="..\..\src\Extensions\TemplateEngine.PromptTemplateEngine\TemplateEngine.PromptTemplateEngine.csproj" />
<ProjectReference Include="..\..\src\SemanticKernel.Abstractions\SemanticKernel.Abstractions.csproj" />
<ProjectReference Include="..\..\src\Skills\Skills.Core\Skills.Core.csproj" />
<ProjectReference Include="..\..\src\Skills\Skills.OpenAPI\Skills.OpenAPI.csproj" />