Share via


FunctionCallContent.InvokeAsync(Kernel, CancellationToken) Method

Definition

Invokes the function represented by the function call content type.

public System.Threading.Tasks.Task<Microsoft.SemanticKernel.FunctionResultContent> InvokeAsync (Microsoft.SemanticKernel.Kernel kernel, System.Threading.CancellationToken cancellationToken = default);
member this.InvokeAsync : Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.FunctionResultContent>
Public Function InvokeAsync (kernel As Kernel, Optional cancellationToken As CancellationToken = Nothing) As Task(Of FunctionResultContent)

Parameters

kernel
Kernel

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

cancellationToken
CancellationToken

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

Returns

The result of the function's execution.

Applies to