pub struct SafetyConfig {
pub max_tool_calls_per_turn: usize,
pub max_consecutive_failures: usize,
}Expand description
Safety configuration for agent runtime guardrails.
These limits are hard constraints enforced by code, not prompt — the model cannot bypass them regardless of its capability.
Fields§
§max_tool_calls_per_turn: usizeMaximum number of tool calls allowed per turn. When exceeded, tool calls are discarded and the LLM is forced to summarize. Default: 128.
max_consecutive_failures: usizeMaximum consecutive failures for the same tool before stopping retries. Default: 3.
Trait Implementations§
Source§impl Clone for SafetyConfig
impl Clone for SafetyConfig
Source§fn clone(&self) -> SafetyConfig
fn clone(&self) -> SafetyConfig
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 SafetyConfig
impl Debug for SafetyConfig
Auto Trait Implementations§
impl Freeze for SafetyConfig
impl RefUnwindSafe for SafetyConfig
impl Send for SafetyConfig
impl Sync for SafetyConfig
impl Unpin for SafetyConfig
impl UnsafeUnpin for SafetyConfig
impl UnwindSafe for SafetyConfig
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