Share via


TerminationStrategy Class

Definition

Base strategy class for defining termination criteria for a AgentGroupChat.

public abstract class TerminationStrategy
type TerminationStrategy = class
Public MustInherit Class TerminationStrategy
Inheritance
TerminationStrategy
Derived

Constructors

TerminationStrategy()

Fields

DefaultMaximumIterations

Restrict number of turns to a reasonable number (99).

Properties

Agents

Set of agents for which this strategy is applicable. If not set, any agent is evaluated.

AutomaticReset

Set to have automatically clear IsComplete if caller proceeds with invocation subsequent to achieving termination criteria.

Logger

The ILogger associated with the TerminationStrategy.

MaximumIterations

The maximum number of agent interactions for a given chat invocation. Defaults to: DefaultMaximumIterations.

Methods

ShouldAgentTerminateAsync(Agent, IReadOnlyList<ChatMessageContent>, CancellationToken)

Called to evaluate termination once Agents is evaluated.

ShouldTerminateAsync(Agent, IReadOnlyList<ChatMessageContent>, CancellationToken)

Evaluate the input message and determine if the chat has met its completion criteria.

Applies to