HandlebarsKernelExtensions.InvokeHandlebarsPromptAsync 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.
Invokes a prompt specified via a prompt template in the Handlebars prompt template format.
public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.FunctionResult> InvokeHandlebarsPromptAsync (this Microsoft.SemanticKernel.Kernel kernel, string promptTemplate, Microsoft.SemanticKernel.KernelArguments? arguments = default, System.Threading.CancellationToken cancellationToken = default);
static member InvokeHandlebarsPromptAsync : Microsoft.SemanticKernel.Kernel * string * Microsoft.SemanticKernel.KernelArguments * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.FunctionResult>
<Extension()>
Public Function InvokeHandlebarsPromptAsync (kernel As Kernel, promptTemplate As String, Optional arguments As KernelArguments = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of FunctionResult)
Parameters
- kernel
- Kernel
The Kernel containing services, plugins, and other state for use throughout the operation.
- promptTemplate
- String
Prompt template for the function, using Handlebars prompt template language
- arguments
- KernelArguments
The arguments to pass to the function's invocation, including any PromptExecutionSettings.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
The result of the function's execution.