CompletionMarkerLoopEvaluator class

A LoopEvaluator that stops the loop once a configured marker string appears in the agent's latest response, and otherwise continues with feedback asking the agent to keep working and to emit the marker when done.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

evaluate(LoopContext context, {CancellationToken? cancellationToken}) Future<LoopEvaluation>
Evaluates the loop state after an iteration and decides whether to re-invoke the wrapped agent and what feedback to provide.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

completionMarkerPlaceholder → const String
The placeholder token replaced with the configured completion marker.
defaultFeedbackMessageTemplate → const String
The default template used to build the feedback produced while the completion marker is absent.
lastResponsePlaceholder → const String
The placeholder token replaced, on each evaluation, with the text of the agent's latest response.