pub struct ChunkingConfig {
pub strategy: ChunkingStrategy,
pub target_size: usize,
pub max_size: usize,
pub overlap: usize,
pub min_size: usize,
pub preserve_sentences: bool,
pub preserve_paragraphs: bool,
}
Expand description
Configuration for text chunking
Fields§
§strategy: ChunkingStrategy
Chunking strategy to use
target_size: usize
Target chunk size in characters
max_size: usize
Maximum chunk size in characters
overlap: usize
Overlap between chunks in characters
min_size: usize
Minimum chunk size in characters
preserve_sentences: bool
Whether to preserve sentence boundaries
preserve_paragraphs: bool
Whether to preserve paragraph boundaries
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
Source§impl Default for ChunkingConfig
impl Default for ChunkingConfig
Source§impl<'de> Deserialize<'de> for ChunkingConfig
impl<'de> Deserialize<'de> for ChunkingConfig
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 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