pub struct SufficiencyConfig {
pub min_tokens: usize,
pub target_tokens: usize,
pub max_tokens: usize,
pub min_content_length: usize,
pub confidence_threshold: f32,
}Expand description
Sufficiency checker configuration.
Fields§
§min_tokens: usizeMinimum tokens for sufficiency.
target_tokens: usizeTarget tokens for full sufficiency.
max_tokens: usizeMaximum tokens before stopping.
min_content_length: usizeMinimum content length (characters).
confidence_threshold: f32Confidence threshold for LLM judge.
Implementations§
Source§impl SufficiencyConfig
impl SufficiencyConfig
Sourcepub fn with_min_tokens(self, tokens: usize) -> Self
pub fn with_min_tokens(self, tokens: usize) -> Self
Set the minimum tokens.
Sourcepub fn with_target_tokens(self, tokens: usize) -> Self
pub fn with_target_tokens(self, tokens: usize) -> Self
Set the target tokens.
Sourcepub fn with_max_tokens(self, tokens: usize) -> Self
pub fn with_max_tokens(self, tokens: usize) -> Self
Set the maximum tokens.
Sourcepub fn with_confidence_threshold(self, threshold: f32) -> Self
pub fn with_confidence_threshold(self, threshold: f32) -> Self
Set the confidence threshold.
Trait Implementations§
Source§impl Clone for SufficiencyConfig
impl Clone for SufficiencyConfig
Source§fn clone(&self) -> SufficiencyConfig
fn clone(&self) -> SufficiencyConfig
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 SufficiencyConfig
impl Debug for SufficiencyConfig
Source§impl Default for SufficiencyConfig
impl Default for SufficiencyConfig
Source§impl<'de> Deserialize<'de> for SufficiencyConfig
impl<'de> Deserialize<'de> for SufficiencyConfig
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 Merge for SufficiencyConfig
impl Merge for SufficiencyConfig
Source§fn merge(&mut self, other: &Self, strategy: MergeStrategy)
fn merge(&mut self, other: &Self, strategy: MergeStrategy)
Merge another configuration into this one.
Auto Trait Implementations§
impl Freeze for SufficiencyConfig
impl RefUnwindSafe for SufficiencyConfig
impl Send for SufficiencyConfig
impl Sync for SufficiencyConfig
impl Unpin for SufficiencyConfig
impl UnsafeUnpin for SufficiencyConfig
impl UnwindSafe for SufficiencyConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more