pub struct ChunkingConfig {
pub max_chunk_size: usize,
pub overlap_size: usize,
pub strategy: ChunkingStrategy,
pub min_chunk_size: usize,
pub respect_paragraphs: bool,
pub respect_sentences: bool,
pub semantic_similarity_threshold: f32,
pub semantic_max_chunks: Option<usize>,
}
Expand description
Configuration for text chunking
Fields§
§max_chunk_size: usize
Maximum characters per chunk
overlap_size: usize
Overlap size in characters
strategy: ChunkingStrategy
Chunking strategy to use
min_chunk_size: usize
Minimum chunk size (chunks smaller than this will be merged)
respect_paragraphs: bool
Whether to respect paragraph boundaries
respect_sentences: bool
Whether to respect sentence boundaries
semantic_similarity_threshold: f32
Semantic chunking similarity threshold (0.0 to 1.0)
semantic_max_chunks: Option<usize>
Maximum number of chunks for semantic chunking
Trait Implementations§
Source§impl Clone for ChunkingConfig
impl Clone for ChunkingConfig
Source§fn clone(&self) -> ChunkingConfig
fn clone(&self) -> ChunkingConfig
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 ChunkingConfig
impl Debug for ChunkingConfig
Auto Trait Implementations§
impl Freeze for ChunkingConfig
impl RefUnwindSafe for ChunkingConfig
impl Send for ChunkingConfig
impl Sync for ChunkingConfig
impl Unpin for ChunkingConfig
impl UnwindSafe for ChunkingConfig
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