-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net: Replace IPromptTemplateEngine with IPromptTemplateFactory Update prompt rendering and template engine in dotnet samples #3348
Conversation
…dd_IPromptTemplateFactory
/sk generate-pr-description |
Generate PR Description: succeeded ✅ |
…//github.com/markwallace-microsoft/semantic-kernel into users/markwallace/Add_IPromptTemplateFactory
dotnet/src/Extensions/TemplateEngine.Basic/BasicPromptTemplateFactory.cs
Outdated
Show resolved
Hide resolved
92c4264
to
535ec57
Compare
dotnet/src/SemanticKernel.Core/Extensions/KernelSemanticFunctionExtensions.cs
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/Extensions/KernelSemanticFunctionExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/Extensions/KernelSemanticFunctionExtensions.cs
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/Extensions/KernelSemanticFunctionExtensions.cs
Show resolved
Hide resolved
dotnet/samples/KernelSyntaxExamples/Example56_TemplateNativeFunctionsWithMultipleArguments.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Extensions/Extensions.UnitTests/TemplateEngine/Prompt/PromptTemplateEngineTests.cs
Show resolved
Hide resolved
…//github.com/markwallace-microsoft/semantic-kernel into users/markwallace/Add_IPromptTemplateFactory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes,
nit. Could not find the Factory.Factory test.
Found! 😊
1239cd1
to
60aeca9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update Mark.
nit comments and small changes suggested.
dotnet/src/SemanticKernel.Abstractions/TemplateEngine/PromptTemplateConfig.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/Extensions/KernelSemanticFunctionExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/TemplateEngine/AggregatorPromptTemplateFactory.cs
Show resolved
Hide resolved
dotnet/src/SemanticKernel.UnitTests/TemplateEngine/AggregatorPromptTemplateFactoryTests.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/TemplateEngine/AggregatorPromptTemplateFactory.cs
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/TemplateEngine/AggregatorPromptTemplateFactory.cs
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/TemplateEngine/AggregatorPromptTemplateFactory.cs
Show resolved
Hide resolved
dotnet/src/Extensions/TemplateEngine.Basic/BasicPromptTemplateFactory.cs
Show resolved
Hide resolved
dotnet/src/Extensions/TemplateEngine.Basic/Extensions/BasicPromptTemplateFactoryExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/Extensions/KernelSemanticFunctionExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/Extensions/KernelSemanticFunctionExtensions.cs
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Abstractions/TemplateEngine/IPromptTemplateFactory.cs
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Core/Extensions/KernelSemanticFunctionExtensions.cs
Outdated
Show resolved
Hide resolved
…//github.com/markwallace-microsoft/semantic-kernel into users/markwallace/Add_IPromptTemplateFactory
…e prompt rendering and template engine in dotnet samples (microsoft#3348) ### Motivation and Context Making this change to enable support for multiple prompt template formats See https://github.com/microsoft/semantic-kernel/blob/main/docs/decisions/0014-custom-prompt-template-formats.md ### Description ### 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 😄 ## Summary This pull request updates the prompt rendering and template engine in the dotnet samples. Specifically, it replaces the PromptTemplate class with the BasicPromptTemplate class, updates the RunSemanticFunctionAsync method to use the new class, and removes the PromptTemplateEngineTests class which is now obsolete. Additionally, a new BasicPromptTemplateFactory class is introduced to create instances of the BasicPromptTemplate class. ## Changes - Replaced PromptTemplate class with BasicPromptTemplate class - Updated RunSemanticFunctionAsync method to use BasicPromptTemplate class - Removed PromptTemplateEngineTests class as it is now obsolete - Introduced BasicPromptTemplateFactory class to create instances of BasicPromptTemplate class --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)*
Motivation and Context
Making this change to enable support for multiple prompt template formats
See https://github.com/microsoft/semantic-kernel/blob/main/docs/decisions/0014-custom-prompt-template-formats.md
Description
Contribution Checklist
Summary
This pull request updates the prompt rendering and template engine in the dotnet samples. Specifically, it replaces the PromptTemplate class with the BasicPromptTemplate class, updates the RunSemanticFunctionAsync method to use the new class, and removes the PromptTemplateEngineTests class which is now obsolete. Additionally, a new BasicPromptTemplateFactory class is introduced to create instances of the BasicPromptTemplate class.
Changes
Powered by Microsoft Semantic Kernel