Freigeben über


KernelFunction.InvokeCoreAsync Method

Definition

Invokes the KernelFunction.

protected abstract System.Threading.Tasks.ValueTask<Microsoft.SemanticKernel.FunctionResult> InvokeCoreAsync (Microsoft.SemanticKernel.Kernel kernel, Microsoft.SemanticKernel.KernelArguments arguments, System.Threading.CancellationToken cancellationToken);
abstract member InvokeCoreAsync : Microsoft.SemanticKernel.Kernel * Microsoft.SemanticKernel.KernelArguments * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.SemanticKernel.FunctionResult>
Protected MustOverride Function InvokeCoreAsync (kernel As Kernel, arguments As KernelArguments, cancellationToken As CancellationToken) As ValueTask(Of FunctionResult)

Parameters

kernel
Kernel

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

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 updated context, potentially a new one if context switching is implemented.

Applies to