pub enum ChunkingStrategy {
FixedSize {
size: usize,
overlap: usize,
},
Sentence {
max_sentences: usize,
overlap_sentences: usize,
},
Paragraph {
max_paragraphs: usize,
},
Semantic {
similarity_threshold: f32,
},
}Expand description
Document chunking strategy
Variants§
FixedSize
Fixed size chunking with overlap
Fields
Sentence
Sentence-based chunking
Fields
Paragraph
Paragraph-based chunking
Semantic
Semantic chunking (requires embeddings)
Trait Implementations§
Source§impl Clone for ChunkingStrategy
impl Clone for ChunkingStrategy
Source§fn clone(&self) -> ChunkingStrategy
fn clone(&self) -> ChunkingStrategy
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 ChunkingStrategy
impl Debug for ChunkingStrategy
Auto Trait Implementations§
impl Freeze for ChunkingStrategy
impl RefUnwindSafe for ChunkingStrategy
impl Send for ChunkingStrategy
impl Sync for ChunkingStrategy
impl Unpin for ChunkingStrategy
impl UnwindSafe for ChunkingStrategy
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