#[non_exhaustive]pub struct DoomLoopConfig {
pub enabled: bool,
pub consecutive_threshold: usize,
pub min_cycle_length: usize,
pub max_cycle_length: usize,
pub cycle_repetitions: usize,
}Expand description
Configuration for doom loop detection.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enabled: boolEnable doom loop detection. Default: true.
consecutive_threshold: usizeNumber of consecutive identical tool calls to trigger detection. Default: 3.
min_cycle_length: usizeMinimum cycle length to detect. Default: 2.
max_cycle_length: usizeMaximum cycle length to detect. Default: 4.
cycle_repetitions: usizeNumber of cycle repetitions to trigger detection. Default: 2.
Implementations§
Source§impl DoomLoopConfig
impl DoomLoopConfig
Sourcepub fn with_disabled(self) -> Self
pub fn with_disabled(self) -> Self
Disables doom loop detection.
Sourcepub fn with_consecutive_threshold(self, threshold: usize) -> Self
pub fn with_consecutive_threshold(self, threshold: usize) -> Self
Sets the consecutive duplicate threshold.
Sourcepub fn with_min_cycle_length(self, length: usize) -> Self
pub fn with_min_cycle_length(self, length: usize) -> Self
Sets the minimum cycle length.
Sourcepub fn with_max_cycle_length(self, length: usize) -> Self
pub fn with_max_cycle_length(self, length: usize) -> Self
Sets the maximum cycle length.
Sourcepub fn with_cycle_repetitions(self, repetitions: usize) -> Self
pub fn with_cycle_repetitions(self, repetitions: usize) -> Self
Sets the cycle repetition count.
Trait Implementations§
Source§impl Clone for DoomLoopConfig
impl Clone for DoomLoopConfig
Source§fn clone(&self) -> DoomLoopConfig
fn clone(&self) -> DoomLoopConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DoomLoopConfig
impl Debug for DoomLoopConfig
Source§impl Default for DoomLoopConfig
impl Default for DoomLoopConfig
Source§impl<'de> Deserialize<'de> for DoomLoopConfig
impl<'de> Deserialize<'de> for DoomLoopConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DoomLoopConfig
impl RefUnwindSafe for DoomLoopConfig
impl Send for DoomLoopConfig
impl Sync for DoomLoopConfig
impl Unpin for DoomLoopConfig
impl UnsafeUnpin for DoomLoopConfig
impl UnwindSafe for DoomLoopConfig
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