次の方法で共有


KernelFunction.InvokeStreamingCoreAsync<TResult> Method

Definition

Invokes the KernelFunction and streams its results.

protected abstract System.Collections.Generic.IAsyncEnumerable<TResult> InvokeStreamingCoreAsync<TResult> (Microsoft.SemanticKernel.Kernel kernel, Microsoft.SemanticKernel.KernelArguments arguments, System.Threading.CancellationToken cancellationToken);
abstract member InvokeStreamingCoreAsync : Microsoft.SemanticKernel.Kernel * Microsoft.SemanticKernel.KernelArguments * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Result>
Protected MustOverride Function InvokeStreamingCoreAsync(Of TResult) (kernel As Kernel, arguments As KernelArguments, cancellationToken As CancellationToken) As IAsyncEnumerable(Of TResult)

Type Parameters

TResult

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

IAsyncEnumerable<TResult>

The updated context, potentially a new one if context switching is implemented.

Applies to