次の方法で共有


HandlebarsPlanner.CreatePlanAsync Method

Definition

Creates a plan for the specified goal.

public System.Threading.Tasks.Task<Microsoft.SemanticKernel.Planning.Handlebars.HandlebarsPlan> CreatePlanAsync (Microsoft.SemanticKernel.Kernel kernel, string goal, Microsoft.SemanticKernel.KernelArguments? arguments = default, System.Threading.CancellationToken cancellationToken = default);
member this.CreatePlanAsync : Microsoft.SemanticKernel.Kernel * string * Microsoft.SemanticKernel.KernelArguments * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.Planning.Handlebars.HandlebarsPlan>
Public Function CreatePlanAsync (kernel As Kernel, goal As String, Optional arguments As KernelArguments = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HandlebarsPlan)

Parameters

kernel
Kernel

The Kernel containing services, plugins, and other state for use throughout the operation.

goal
String

The goal for which a plan should be created.

arguments
KernelArguments

Optional. Context arguments to pass to the planner.

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

The created plan.

Exceptions

goal is null.

goal is empty or entirely composed of whitespace.

A plan could not be created.

Applies to