-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: Markdown prompt support (without tool call support) #5961
.Net: Markdown prompt support (without tool call support) #5961
Conversation
dotnet/src/Experimental/Experimental.Prompty.UnitTests/Experimental.Prompty.UnitTests.csproj
Outdated
Show resolved
Hide resolved
dotnet/src/SemanticKernel.Abstractions/SemanticKernel.Abstractions.csproj
Outdated
Show resolved
Hide resolved
dotnet/src/Extensions/PromptTemplates.Prompty/Experimental.Prompty.csproj
Outdated
Show resolved
Hide resolved
dotnet/src/Extensions/PromptTemplates.Prompty/Extensions/PromptyKernelExtension.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Extensions/PromptTemplates.Prompty/PromptyKernelFunction.cs
Outdated
Show resolved
Hide resolved
e074b97
to
da663ad
Compare
dotnet/src/Extensions/PromptTemplates.Liquid/LiquidPromptTemplate.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Extensions/PromptTemplates.Liquid/LiquidPromptTemplate.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Extensions/PromptTemplates.Liquid/LiquidPromptTemplate.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Functions/Functions.Prompty/Extensions/PromptyKernelExtension.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Functions/Functions.Prompty/Extensions/PromptyKernelExtension.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Functions/Functions.Prompty/Extensions/PromptyKernelExtension.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Functions/Functions.Prompty/Extensions/PromptyKernelExtension.cs
Outdated
Show resolved
Hide resolved
public string? AzureDeployment { get; set; } | ||
|
||
[YamlMember(Alias = "api_key")] | ||
public string? ApiKey { get; set; } |
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.
Is this information really put into a prompty file?
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.
This information would tie a Prompty file to one particular deployment. These will change frequently as new models emerge and these artifacts should be easily transferable to other contexts e.g. a Prompty file the Data Scientists developed should be transferable to another team to deploy. Or if I'm building a product my Prompty files should run with any customer deployment.
In our YAML file we include the model configuration i.e. temperature, top_p, ... but not the model deployment, that is treated as a seperate concern.
...sions/PromptTemplates.Liquid.UnitTests/LiquidTemplateTest.ItRenderChatTestAsync.verified.txt
Outdated
Show resolved
Hide resolved
dotnet/src/Extensions/PromptTemplates.Liquid.UnitTests/TestData/chat.txt
Show resolved
Hide resolved
dotnet/src/Extensions/PromptTemplates.Liquid/LiquidPromptTemplate.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Extensions/PromptTemplates.Liquid.UnitTests/LiquidTemplateTest.cs
Show resolved
Hide resolved
dotnet/src/Functions/Functions.Prompty/Extensions/PromptyKernelExtension.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Functions/Functions.Prompty/Extensions/PromptyKernelExtension.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Functions/Functions.Prompty/Extensions/PromptyKernelExtension.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Functions/Functions.Prompty/Extensions/PromptyKernelExtension.cs
Outdated
Show resolved
Hide resolved
…ate.cs Co-authored-by: Stephen Toub <[email protected]>
…ate.cs Co-authored-by: Stephen Toub <[email protected]>
…ate.cs Co-authored-by: Stephen Toub <[email protected]>
…ate.cs Co-authored-by: Stephen Toub <[email protected]>
…lExtension.cs Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
…lExtension.cs Co-authored-by: Stephen Toub <[email protected]>
dotnet/src/Extensions/PromptTemplates.Liquid.UnitTests/LiquidTemplateFactoryTest.cs
Show resolved
Hide resolved
dotnet/src/Extensions/PromptTemplates.Liquid.UnitTests/TestData/chat.txt
Show resolved
Hide resolved
dotnet/src/Functions/Functions.Prompty/Extensions/PromptyKernelExtensions.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Functions/Functions.Prompty/Extensions/PromptyKernelExtensions.cs
Show resolved
Hide resolved
09778cd
into
microsoft:feature-prompty
Motivation and Context
Description
This PR brings markdown prompt template support for semantic kernel. It essentially does a code-level copy of the original markdown prompt template implementation to the sk repo, plus an extension API to execute the template.
Because the markdown prompt template support is still in an very, very early stage. All code is put underExperimental
namespace and all the class except the extension API is marked as internal only.You can find the spec for the markdown prompt template here
The intergration comes with two projects
ChatPromptParser
KernelFunctionFromPrompt
from prompty file viaCreateFunctionFromPrompty
APIThe tool call support will come in the next PR as this PR is already growing large. Also tool call support needs some extra care which might need further discussion on how to implement cohere to sk pattern
Contribution Checklist