KernelFunctionSelectionStrategy.SelectAgentAsync 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.
Determine which agent goes next.
protected override sealed System.Threading.Tasks.Task<Microsoft.SemanticKernel.Agents.Agent> SelectAgentAsync (System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.Agents.Agent> agents, System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.ChatMessageContent> history, System.Threading.CancellationToken cancellationToken = default);
override this.SelectAgentAsync : System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.Agents.Agent> * System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.ChatMessageContent> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.Agents.Agent>
Protected Overrides NotOverridable Function SelectAgentAsync (agents As IReadOnlyList(Of Agent), history As IReadOnlyList(Of ChatMessageContent), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Agent)
Parameters
- agents
- IReadOnlyList<Agent>
The agents participating in chat.
- history
- IReadOnlyList<ChatMessageContent>
The chat history.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
The agent who shall take the next turn.