AgentGroupChat.InvokeAsync 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

InvokeAsync(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).

InvokeAsync(Agent, CancellationToken)

Process a single interaction between a given Agent an a AgentGroupChat.

InvokeAsync(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).

C#
public override System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.ChatMessageContent> InvokeAsync (System.Threading.CancellationToken cancellationToken = default);

Parameters

cancellationToken
CancellationToken

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

Returns

Asynchronous enumeration of messages.

Applies to

Semantic Kernel Dotnet Latest
Proizvod Verzije
Semantic Kernel Dotnet Latest

InvokeAsync(Agent, CancellationToken)

Process a single interaction between a given Agent an a AgentGroupChat.

C#
public System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.ChatMessageContent> InvokeAsync (Microsoft.SemanticKernel.Agents.Agent agent, System.Threading.CancellationToken cancellationToken = default);

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.

Applies to

Semantic Kernel Dotnet Latest
Proizvod Verzije
Semantic Kernel Dotnet Latest