Sdílet prostřednictvím


KernelFunctionSelectionStrategy Class

Definition

Determines agent selection based on the evaluation of a KernelFunction.

public class KernelFunctionSelectionStrategy : Microsoft.SemanticKernel.Agents.Chat.SelectionStrategy
type KernelFunctionSelectionStrategy = class
    inherit SelectionStrategy
Public Class KernelFunctionSelectionStrategy
Inherits SelectionStrategy
Inheritance
KernelFunctionSelectionStrategy

Constructors

KernelFunctionSelectionStrategy(KernelFunction, Kernel)

Determines agent selection based on the evaluation of a KernelFunction.

Fields

DefaultAgentsVariableName

The default value for AgentVariableName.

DefaultHistoryVariableName

The default value for HistoryVariableName.

Properties

AgentsVariableName

The KernelArguments key associated with the list of agent names when invoking Function.

Arguments

Optional arguments used when invoking Function.

Function

The KernelFunction invoked as selection criteria.

HasSelected

Flag indicating if an agent has been selected (first time).

(Inherited from SelectionStrategy)
HistoryVariableName

The KernelArguments key associated with the chat history when invoking Function.

InitialAgent

An optional agent for initial selection.

(Inherited from SelectionStrategy)
Kernel

The Kernel used when invoking Function.

Logger

The ILogger associated with the SelectionStrategy.

(Inherited from SelectionStrategy)
ResultParser

A callback responsible for translating the FunctionResult to the termination criteria.

UseInitialAgentAsFallback

When set, will use InitialAgent in the event of a failure to select an agent.

Methods

NextAsync(IReadOnlyList<Agent>, IReadOnlyList<ChatMessageContent>, CancellationToken)

Determine which agent goes next.

(Inherited from SelectionStrategy)
SelectAgentAsync(IReadOnlyList<Agent>, IReadOnlyList<ChatMessageContent>, CancellationToken)

Determine which agent goes next.

Applies to