pub struct LoopDetectionConfig {
pub exact_repeat_threshold: usize,
pub similarity_threshold: f64,
pub similarity_window: usize,
pub max_tokens_per_run: u64,
pub max_cost_microdollars_per_run: u64,
}Expand description
Configuration for loop detection thresholds.
Fields§
§exact_repeat_threshold: usizeNumber of identical consecutive calls before escalation (default: 3).
similarity_threshold: f64Similarity threshold (0.0–1.0) for the similarity detector (default: 0.9).
similarity_window: usizeSliding window size for similarity detection (default: 5).
max_tokens_per_run: u64Maximum tokens per run before cost runaway triggers (0 = disabled).
max_cost_microdollars_per_run: u64Maximum cost in microdollars per run before cost runaway triggers (0 = disabled).
Trait Implementations§
Source§impl Clone for LoopDetectionConfig
impl Clone for LoopDetectionConfig
Source§fn clone(&self) -> LoopDetectionConfig
fn clone(&self) -> LoopDetectionConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoopDetectionConfig
impl Debug for LoopDetectionConfig
Auto Trait Implementations§
impl Freeze for LoopDetectionConfig
impl RefUnwindSafe for LoopDetectionConfig
impl Send for LoopDetectionConfig
impl Sync for LoopDetectionConfig
impl Unpin for LoopDetectionConfig
impl UnsafeUnpin for LoopDetectionConfig
impl UnwindSafe for LoopDetectionConfig
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