KernelFunctionSelectionStrategy Class
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.
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
Constructors
KernelFunctionSelectionStrategy(KernelFunction, Kernel) |
Determines agent selection based on the evaluation of a KernelFunction. |
Fields
DefaultAgentsVariableName |
The default value for AgentsVariableName. |
DefaultHistoryVariableName |
The default value for HistoryVariableName. |
Properties
AgentsVariableName |
Gets the KernelArguments key associated with the list of agent names when invoking Function. |
Arguments |
Gets the optional arguments used when invoking Function. |
EvaluateNameOnly |
Gets a value that indicates whether only the agent name is included in the history when invoking Function. |
Function |
Gets the KernelFunction invoked as selection criteria. |
HasSelected |
Gets a value that indicates if an agent has been selected (first time). (Inherited from SelectionStrategy) |
HistoryReducer |
Gets an optional IChatHistoryReducer to reduce the history. |
HistoryVariableName |
Gets the KernelArguments key associated with the chat history when invoking Function. |
InitialAgent |
Gets or sets an optional agent for initial selection. (Inherited from SelectionStrategy) |
Kernel | |
Logger |
Gets the ILogger associated with the SelectionStrategy. (Inherited from SelectionStrategy) |
ResultParser |
Gets a callback responsible for translating the FunctionResult to the termination criteria. |
UseInitialAgentAsFallback |
Gets a value that indicates whether InitialAgent is used in the event of a failure to select an agent. |
Methods
NextAsync(IReadOnlyList<Agent>, IReadOnlyList<ChatMessageContent>, CancellationToken) |
Determines which agent goes next. (Inherited from SelectionStrategy) |
SelectAgentAsync(IReadOnlyList<Agent>, IReadOnlyList<ChatMessageContent>, CancellationToken) |
Determines which agent goes next. |