pub struct PerplexityGuardConfig {
pub max_perplexity: f32,
pub min_perplexity: f32,
pub min_entropy: f32,
pub suffix_ratio: f32,
pub analyze_full_text: bool,
pub analyze_suffix: bool,
pub action: GuardAction,
pub severity: Severity,
}Expand description
Perplexity guard configuration
Fields§
§max_perplexity: f32Maximum allowed perplexity (above = gibberish)
min_perplexity: f32Minimum allowed perplexity (below = too repetitive)
min_entropy: f32Minimum allowed entropy
suffix_ratio: f32Ratio of text to analyze as suffix (0.0 - 1.0)
analyze_full_text: boolWhether to analyze the full text
analyze_suffix: boolWhether to focus on suffix analysis
action: GuardActionAction to take when triggered
severity: SeveritySeverity to assign to matches
Trait Implementations§
Source§impl Clone for PerplexityGuardConfig
impl Clone for PerplexityGuardConfig
Source§fn clone(&self) -> PerplexityGuardConfig
fn clone(&self) -> PerplexityGuardConfig
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 PerplexityGuardConfig
impl Debug for PerplexityGuardConfig
Source§impl Default for PerplexityGuardConfig
impl Default for PerplexityGuardConfig
Source§impl<'de> Deserialize<'de> for PerplexityGuardConfig
impl<'de> Deserialize<'de> for PerplexityGuardConfig
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
Auto Trait Implementations§
impl Freeze for PerplexityGuardConfig
impl RefUnwindSafe for PerplexityGuardConfig
impl Send for PerplexityGuardConfig
impl Sync for PerplexityGuardConfig
impl Unpin for PerplexityGuardConfig
impl UnwindSafe for PerplexityGuardConfig
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