Share via


TerminationStrategy Class

Definition

Provides a base strategy class for defining termination criteria for an AgentGroupChat.

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

Constructors

TerminationStrategy()

Fields

DefaultMaximumIterations

Specifies a reasonable limit on the number of turns.

Properties

Agents

Gets or sets the set of agents for which this strategy is applicable.

AutomaticReset

Gets or sets a value that indicates whether IsComplete is automatically cleared if the caller proceeds with invocation subsequent to achieving termination criteria.

Logger

Gets the ILogger associated with the TerminationStrategy.

MaximumIterations

Gets or sets the maximum number of agent interactions for a given chat invocation.

Methods

ShouldAgentTerminateAsync(Agent, IReadOnlyList<ChatMessageContent>, CancellationToken)

Evaluates termination once Agents is evaluated.

ShouldTerminateAsync(Agent, IReadOnlyList<ChatMessageContent>, CancellationToken)

Evaluates the input message and determines if the chat has met its completion criteria.

Applies to