pub struct PromptInjectionConfig {
pub score_threshold: f32,
pub max_scan_bytes: usize,
pub fingerprint_capacity: usize,
}Expand description
Configuration for PromptInjectionGuard.
Fields§
§score_threshold: f32Total-score threshold for denial (default 0.8).
max_scan_bytes: usizeMaximum number of input bytes to canonicalize/scan (default 64 KiB). Longer inputs are truncated at a UTF-8 boundary.
fingerprint_capacity: usizeFingerprint LRU capacity (default 1024).
Trait Implementations§
Source§impl Clone for PromptInjectionConfig
impl Clone for PromptInjectionConfig
Source§fn clone(&self) -> PromptInjectionConfig
fn clone(&self) -> PromptInjectionConfig
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 PromptInjectionConfig
impl Debug for PromptInjectionConfig
Auto Trait Implementations§
impl Freeze for PromptInjectionConfig
impl RefUnwindSafe for PromptInjectionConfig
impl Send for PromptInjectionConfig
impl Sync for PromptInjectionConfig
impl Unpin for PromptInjectionConfig
impl UnsafeUnpin for PromptInjectionConfig
impl UnwindSafe for PromptInjectionConfig
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