次の方法で共有


HandlebarsKernelExtensions.InvokeHandlebarsPromptAsync Method

Definition

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.

Applies to