pub struct GoalCondition { /* private fields */ }Expand description
A persistent objective evaluated by an independent judge after each natural completion.
Implementations§
Source§impl GoalCondition
impl GoalCondition
Sourcepub fn new(objective: impl Into<String>, judge: Arc<BoxedProvider>) -> Self
pub fn new(objective: impl Into<String>, judge: Arc<BoxedProvider>) -> Self
Create a goal from an objective string and an INDEPENDENT judge
provider (a separate provider/model from the working agent). Uses
DEFAULT_MAX_CONTINUATIONS.
Sourcepub fn with_per_criterion(self, on: bool) -> Self
pub fn with_per_criterion(self, on: bool) -> Self
Opt into per-criterion judging: the judge grades each criterion line of the objective separately and names the specific unmet ones — sharper continuation guidance for multi-criterion objectives, at the cost of a longer judge reply.
Sourcepub fn with_max_continuations(self, n: u32) -> Self
pub fn with_max_continuations(self, n: u32) -> Self
Override how many extra continuations are granted to reach the goal after
the agent first naturally completes. 0 means “judge once, never
continue” (the judge still gates the exit, but no re-prompt is issued).
Sourcepub fn max_continuations(&self) -> u32
pub fn max_continuations(&self) -> u32
The configured continuation cap.
Sourcepub fn objective(&self) -> &str
pub fn objective(&self) -> &str
The objective text (used to recite the goal in continuation guidance).
Sourcepub fn per_criterion(&self) -> bool
pub fn per_criterion(&self) -> bool
Whether per-criterion judging is enabled (see Self::with_per_criterion).
Trait Implementations§
Source§impl Clone for GoalCondition
impl Clone for GoalCondition
Source§fn clone(&self) -> GoalCondition
fn clone(&self) -> GoalCondition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more