Partager via


FunctionCallingStepwisePlanner.ExecuteAsync Method

Definition

Execute a plan

public System.Threading.Tasks.Task<Microsoft.SemanticKernel.Planning.FunctionCallingStepwisePlannerResult> ExecuteAsync (Microsoft.SemanticKernel.Kernel kernel, string question, Microsoft.SemanticKernel.ChatCompletion.ChatHistory? chatHistoryForSteps = default, System.Threading.CancellationToken cancellationToken = default);
member this.ExecuteAsync : Microsoft.SemanticKernel.Kernel * string * Microsoft.SemanticKernel.ChatCompletion.ChatHistory * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.Planning.FunctionCallingStepwisePlannerResult>
Public Function ExecuteAsync (kernel As Kernel, question As String, Optional chatHistoryForSteps As ChatHistory = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of FunctionCallingStepwisePlannerResult)

Parameters

kernel
Kernel

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

question
String

The question to answer

chatHistoryForSteps
ChatHistory

The chat history for the steps of the plan. If null, the planner will generate the chat history for the first step.

cancellationToken
CancellationToken

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

Returns

Result containing the model's response message and chat history.

Applies to