pub struct ChunkConfig {
pub target_size: usize,
pub max_size: usize,
pub overlap: usize,
pub hierarchical: bool,
pub max_depth: u8,
}Expand description
Configuration for chunking.
Fields§
§target_size: usizeTarget chunk size in tokens
max_size: usizeMaximum chunk size in tokens
overlap: usizeOverlap between chunks in tokens
hierarchical: boolEnable hierarchical chunking
max_depth: u8Maximum hierarchy depth
Trait Implementations§
Source§impl Clone for ChunkConfig
impl Clone for ChunkConfig
Source§fn clone(&self) -> ChunkConfig
fn clone(&self) -> ChunkConfig
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 ChunkConfig
impl Debug for ChunkConfig
Source§impl Default for ChunkConfig
impl Default for ChunkConfig
Source§impl<'de> Deserialize<'de> for ChunkConfig
impl<'de> Deserialize<'de> for ChunkConfig
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 ChunkConfig
impl RefUnwindSafe for ChunkConfig
impl Send for ChunkConfig
impl Sync for ChunkConfig
impl Unpin for ChunkConfig
impl UnwindSafe for ChunkConfig
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