pub struct DetectorConfig {
pub max_scan_bytes: usize,
pub statistical: StatisticalThresholds,
pub linear_model: LinearModel,
pub layer_weights: LayerWeights,
}Expand description
Complete configuration for JailbreakDetector.
Fields§
§max_scan_bytes: usizeMaximum bytes to canonicalize + scan. Longer inputs are truncated at a UTF-8 boundary before detection runs.
statistical: StatisticalThresholdsStatistical-layer thresholds.
linear_model: LinearModelLinear-model weights for the ML layer.
layer_weights: LayerWeightsBlend weights across the three layers.
Trait Implementations§
Source§impl Clone for DetectorConfig
impl Clone for DetectorConfig
Source§fn clone(&self) -> DetectorConfig
fn clone(&self) -> DetectorConfig
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 DetectorConfig
impl Debug for DetectorConfig
Source§impl Default for DetectorConfig
impl Default for DetectorConfig
Source§impl<'de> Deserialize<'de> for DetectorConfig
impl<'de> Deserialize<'de> for DetectorConfig
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
Source§impl PartialEq for DetectorConfig
impl PartialEq for DetectorConfig
Source§impl Serialize for DetectorConfig
impl Serialize for DetectorConfig
impl StructuralPartialEq for DetectorConfig
Auto Trait Implementations§
impl Freeze for DetectorConfig
impl RefUnwindSafe for DetectorConfig
impl Send for DetectorConfig
impl Sync for DetectorConfig
impl Unpin for DetectorConfig
impl UnsafeUnpin for DetectorConfig
impl UnwindSafe for DetectorConfig
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