AgentChannel.InvokeAsync(Agent, CancellationToken) 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.

Perform a discrete incremental interaction between a single Agent and AgentChat.

C#
protected internal abstract System.Collections.Generic.IAsyncEnumerable<(bool IsVisible, Microsoft.SemanticKernel.ChatMessageContent Message)> 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.

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

Proizvod Verzije
Semantic Kernel Dotnet Latest