pub struct ChunkConfig {
pub max_tokens: usize,
pub overlap_tokens: usize,
}Expand description
Size limits for chunk, in estimated tokens of four chars each.
max_tokens bounds every chunk; overlap_tokens is how much of a chunk’s
end is repeated at the start of the next one, and must be below max_tokens.
Fields§
§max_tokens: usize§overlap_tokens: usizeTrait 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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ChunkConfig
Source§impl Debug for ChunkConfig
impl Debug for ChunkConfig
impl Eq for ChunkConfig
Source§impl PartialEq for ChunkConfig
impl PartialEq for ChunkConfig
impl StructuralPartialEq for ChunkConfig
Auto Trait Implementations§
impl Forget for ChunkConfig
impl Freeze for ChunkConfig
impl Move for ChunkConfig
impl RefUnwindSafe for ChunkConfig
impl Send for ChunkConfig
impl Sync for ChunkConfig
impl Unpin for ChunkConfig
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.