AgentGroupChat.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(CancellationToken) |
Process a series of interactions between the Agents that have joined this AgentGroupChat. The interactions will proceed according to the SelectionStrategy and the TerminationStrategy defined via ExecutionSettings. In the absence of an SelectionStrategy, this method will not invoke any agents. Any agent may be explicitly selected by calling InvokeAsync(Agent, CancellationToken). |
InvokeStreamingAsync(Agent, CancellationToken) |
Process a single interaction between a given Agent an a AgentGroupChat. |
InvokeStreamingAsync(CancellationToken)
Process a series of interactions between the Agents that have joined this AgentGroupChat. The interactions will proceed according to the SelectionStrategy and the TerminationStrategy defined via ExecutionSettings. In the absence of an SelectionStrategy, this method will not invoke any agents. Any agent may be explicitly selected by calling InvokeAsync(Agent, CancellationToken).
public override System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent> InvokeStreamingAsync (System.Threading.CancellationToken cancellationToken = default);
override this.InvokeStreamingAsync : System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent>
Public Overrides Function InvokeStreamingAsync (Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of StreamingChatMessageContent)
Parameters
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
Asynchronous enumeration of streaming messages.
Applies to
InvokeStreamingAsync(Agent, CancellationToken)
Process a single interaction between a given Agent an a AgentGroupChat.
public System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent> InvokeStreamingAsync (Microsoft.SemanticKernel.Agents.Agent agent, System.Threading.CancellationToken cancellationToken = default);
override this.InvokeStreamingAsync : Microsoft.SemanticKernel.Agents.Agent * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent>
Public Function InvokeStreamingAsync (agent As Agent, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of StreamingChatMessageContent)
Parameters
- agent
- Agent
The agent actively interacting with the chat.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
Asynchronous enumeration of messages.