AgentChannel<TAgent>.InvokeStreamingAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
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)
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.