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