pub struct JailbreakGuardConfig {
pub threshold: f32,
pub layer_weights: LayerWeights,
pub fingerprint_dedup_capacity: usize,
pub detector: DetectorConfig,
}Expand description
Configuration for JailbreakGuard.
Keep the surface area small at this layer: the multi-layer internals are
configured via DetectorConfig (exposed as the detector field) so
operators can tune layer weights without touching threshold / dedup
policy.
Fields§
§threshold: f32Score threshold at which the guard denies. Values in [0.0, 1.0].
The default is DEFAULT_DENY_THRESHOLD.
layer_weights: LayerWeightsBlend weights for the three detection layers. Exposed at the guard level so callers can tune sensitivity without re-specifying thresholds.
fingerprint_dedup_capacity: usizeCapacity of the fingerprint-dedup LRU. 0 becomes 1 internally.
detector: DetectorConfigDetector configuration (thresholds, ML weights, etc.). Any
layer_weights set here is overridden by the guard-level
Self::layer_weights at construction time so there is a single
source of truth for blend weights.
Trait Implementations§
Source§impl Clone for JailbreakGuardConfig
impl Clone for JailbreakGuardConfig
Source§fn clone(&self) -> JailbreakGuardConfig
fn clone(&self) -> JailbreakGuardConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more