AgentChannel.InvokeStreamingAsync Method

Definition

Perform a discrete incremental interaction between a single Agent and AgentChat with streaming results.

protected internal abstract System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent> InvokeStreamingAsync (Microsoft.SemanticKernel.Agents.Agent agent, System.Collections.Generic.IList<Microsoft.SemanticKernel.ChatMessageContent> messages, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeStreamingAsync : Microsoft.SemanticKernel.Agents.Agent * System.Collections.Generic.IList<Microsoft.SemanticKernel.ChatMessageContent> * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent>
Protected Friend MustOverride Function InvokeStreamingAsync (agent As Agent, messages As IList(Of ChatMessageContent), Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of StreamingChatMessageContent)

Parameters

agent
Agent

The agent actively interacting with the chat.

messages
IList<ChatMessageContent>

The receiver for the completed messages generated

cancellationToken
CancellationToken

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

Returns

Asynchronous enumeration of streaming messages.

Applies to