KernelFunctionYaml.FromPromptYaml Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a KernelFunction instance for a prompt function using the specified markdown text.
public static Microsoft.SemanticKernel.KernelFunction FromPromptYaml (string text, Microsoft.SemanticKernel.IPromptTemplateFactory? promptTemplateFactory = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
static member FromPromptYaml : string * Microsoft.SemanticKernel.IPromptTemplateFactory * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.SemanticKernel.KernelFunction
Public Shared Function FromPromptYaml (text As String, Optional promptTemplateFactory As IPromptTemplateFactory = Nothing, Optional loggerFactory As ILoggerFactory = Nothing) As KernelFunction
Parameters
- text
- String
YAML representation of the PromptTemplateConfig to use to create the prompt function.
- promptTemplateFactory
- IPromptTemplateFactory
The IPromptTemplateFactory to use when interpreting the prompt template configuration into a IPromptTemplate. If null, a default factory will be used.
- loggerFactory
- ILoggerFactory
The ILoggerFactory to use for logging. If null, no logging will be performed.
Returns
The created KernelFunction.