pub struct TrajectoryCheck { /* private fields */ }Expand description
Builder for a set of rules, for checks written in Rust.
Implementations§
Source§impl TrajectoryCheck
impl TrajectoryCheck
pub fn new() -> Self
Sourcepub fn rule(self, rule: Rule) -> Self
pub fn rule(self, rule: Rule) -> Self
Add any rule, including ones the shortcuts below do not cover.
pub fn requires(self, tool: &str) -> Self
pub fn order(self, before: &str, after: &str) -> Self
pub fn forbids(self, tool: &str, args_match: Option<&str>) -> Self
pub fn args(self, tool: &str, field: &str, pattern: &str) -> Self
pub fn max_model_calls(self, n: u32) -> Self
pub fn max_tool_calls(self, n: u32) -> Self
pub fn max_tokens(self, n: u32) -> Self
pub fn no_repeated_failure(self, times: u32) -> Self
pub fn ends(self) -> Self
Sourcepub fn check(&self, t: &Trajectory) -> Report
pub fn check(&self, t: &Trajectory) -> Report
Run every rule; all violations are collected, not just the first.
Trait Implementations§
Source§impl Clone for TrajectoryCheck
impl Clone for TrajectoryCheck
Source§impl Debug for TrajectoryCheck
impl Debug for TrajectoryCheck
Auto Trait Implementations§
impl Forget for TrajectoryCheck
impl Freeze for TrajectoryCheck
impl RefUnwindSafe for TrajectoryCheck
impl Send for TrajectoryCheck
impl Sync for TrajectoryCheck
impl Unpin for TrajectoryCheck
impl UnsafeUnpin for TrajectoryCheck
impl UnwindSafe for TrajectoryCheck
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more