Share via


AgentChannel<TAgent>.InvokeStreamingAsync Method

Definition

Overloads

InvokeStreamingAsync(Agent, IList<ChatMessageContent>, CancellationToken)

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

InvokeStreamingAsync(TAgent, IList<ChatMessageContent>, CancellationToken)

Process a discrete incremental interaction between a single Agent an a AgentChat.

InvokeStreamingAsync(Agent, IList<ChatMessageContent>, CancellationToken)

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

protected internal override 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);
override this.InvokeStreamingAsync : Microsoft.SemanticKernel.Agents.Agent * System.Collections.Generic.IList<Microsoft.SemanticKernel.ChatMessageContent> * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent>
Protected Friend Overrides 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

InvokeStreamingAsync(TAgent, IList<ChatMessageContent>, CancellationToken)

Process a discrete incremental interaction between a single Agent an a AgentChat.

protected internal abstract System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent> InvokeStreamingAsync (TAgent agent, System.Collections.Generic.IList<Microsoft.SemanticKernel.ChatMessageContent> messages, System.Threading.CancellationToken cancellationToken = default);
override this.InvokeStreamingAsync : '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 TAgent, messages As IList(Of ChatMessageContent), Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of StreamingChatMessageContent)

Parameters

agent
TAgent

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 messages.

Remarks

In the enumeration returned by this method, a message is considered visible if it is intended to be displayed to the user. Example of a non-visible message is function-content for functions that are automatically executed.

Applies to