pub struct ToolLoopDetectionConfig {
pub enabled: bool,
pub custom_message: Option<String>,
}Expand description
Configuration for detecting and preventing tool call loops
Fields§
§enabled: boolWhether loop detection is enabled
custom_message: Option<String>Custom message to inject when a loop is detected If None, uses a default message
Implementations§
Source§impl ToolLoopDetectionConfig
impl ToolLoopDetectionConfig
Sourcepub fn with_message(message: impl Into<String>) -> Self
pub fn with_message(message: impl Into<String>) -> Self
Create with a custom message
Sourcepub fn get_message(
&self,
tool_name: &str,
previous_result: &JsonValue,
) -> String
pub fn get_message( &self, tool_name: &str, previous_result: &JsonValue, ) -> String
Get the message to use when a loop is detected
Trait Implementations§
Source§impl Clone for ToolLoopDetectionConfig
impl Clone for ToolLoopDetectionConfig
Source§fn clone(&self) -> ToolLoopDetectionConfig
fn clone(&self) -> ToolLoopDetectionConfig
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 ToolLoopDetectionConfig
impl Debug for ToolLoopDetectionConfig
Auto Trait Implementations§
impl Freeze for ToolLoopDetectionConfig
impl RefUnwindSafe for ToolLoopDetectionConfig
impl Send for ToolLoopDetectionConfig
impl Sync for ToolLoopDetectionConfig
impl Unpin for ToolLoopDetectionConfig
impl UnwindSafe for ToolLoopDetectionConfig
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