pub struct SemanticChunkerConfig {
pub breakpoint_strategy: BreakpointStrategy,
pub threshold_amount: f32,
pub min_chunk_size: usize,
pub max_chunk_size: usize,
pub buffer_size: usize,
}Expand description
Configuration for semantic chunking
Fields§
§breakpoint_strategy: BreakpointStrategyStrategy for determining breakpoints
threshold_amount: f32Threshold amount:
- Percentile: 0-100 (default: 95.0)
- StandardDeviation: number of std devs (default: 3.0)
- Absolute: similarity threshold (default: 0.5)
min_chunk_size: usizeMinimum chunk size in sentences
max_chunk_size: usizeMaximum chunk size in sentences (0 = unlimited)
buffer_size: usizeBuffer size for comparing sentences (default: 1 = compare consecutive)
Trait Implementations§
Source§impl Clone for SemanticChunkerConfig
impl Clone for SemanticChunkerConfig
Source§fn clone(&self) -> SemanticChunkerConfig
fn clone(&self) -> SemanticChunkerConfig
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 SemanticChunkerConfig
impl Debug for SemanticChunkerConfig
Auto Trait Implementations§
impl Freeze for SemanticChunkerConfig
impl RefUnwindSafe for SemanticChunkerConfig
impl Send for SemanticChunkerConfig
impl Sync for SemanticChunkerConfig
impl Unpin for SemanticChunkerConfig
impl UnsafeUnpin for SemanticChunkerConfig
impl UnwindSafe for SemanticChunkerConfig
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