pub struct StaticChunkingStrategy {
pub max_chunk_size_tokens: u16,
pub chunk_overlap_tokens: u16,
}
Expand description
Static Chunking Strategy
Fields§
§max_chunk_size_tokens: u16
The maximum number of tokens in each chunk. The default value is 800
. The minimum value is 100
and the maximum value is 4096
.
chunk_overlap_tokens: u16
The number of tokens that overlap between chunks. The default value is 400
.
Note that the overlap must not exceed half of max_chunk_size_tokens
.
Trait Implementations§
Source§impl Clone for StaticChunkingStrategy
impl Clone for StaticChunkingStrategy
Source§fn clone(&self) -> StaticChunkingStrategy
fn clone(&self) -> StaticChunkingStrategy
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 StaticChunkingStrategy
impl Debug for StaticChunkingStrategy
Source§impl Default for StaticChunkingStrategy
impl Default for StaticChunkingStrategy
Source§fn default() -> StaticChunkingStrategy
fn default() -> StaticChunkingStrategy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StaticChunkingStrategy
impl<'de> Deserialize<'de> for StaticChunkingStrategy
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
Source§impl PartialEq for StaticChunkingStrategy
impl PartialEq for StaticChunkingStrategy
Source§impl Serialize for StaticChunkingStrategy
impl Serialize for StaticChunkingStrategy
impl StructuralPartialEq for StaticChunkingStrategy
Auto Trait Implementations§
impl Freeze for StaticChunkingStrategy
impl RefUnwindSafe for StaticChunkingStrategy
impl Send for StaticChunkingStrategy
impl Sync for StaticChunkingStrategy
impl Unpin for StaticChunkingStrategy
impl UnwindSafe for StaticChunkingStrategy
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