Share via


KernelFunctionMarkdown.FromPromptMarkdown Method

Definition

Creates a KernelFunction instance for a prompt function using the specified markdown text.

public static Microsoft.SemanticKernel.KernelFunction FromPromptMarkdown (string text, string functionName, Microsoft.SemanticKernel.IPromptTemplateFactory? promptTemplateFactory = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
static member FromPromptMarkdown : string * string * Microsoft.SemanticKernel.IPromptTemplateFactory * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.SemanticKernel.KernelFunction
Public Shared Function FromPromptMarkdown (text As String, functionName As String, Optional promptTemplateFactory As IPromptTemplateFactory = Nothing, Optional loggerFactory As ILoggerFactory = Nothing) As KernelFunction

Parameters

text
String

Markdown representation of the PromptTemplateConfig to use to create the prompt function.

functionName
String

The name of the 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.

Applies to