pub struct StaticChunkingStrategy {
pub max_chunk_size_tokens: u16,
pub chunk_overlap_tokens: u16,
}Available on crate feature
assistant-types only.Expand description
Static Chunking Strategy
Fields§
§max_chunk_size_tokens: u16The 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: u16The 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
Available on (crate features assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl Clone for StaticChunkingStrategy
Available on (crate features
assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.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
Available on (crate features assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl Debug for StaticChunkingStrategy
Available on (crate features
assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.Source§impl Default for StaticChunkingStrategy
Available on (crate features assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl Default for StaticChunkingStrategy
Available on (crate features
assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.Source§fn default() -> StaticChunkingStrategy
fn default() -> StaticChunkingStrategy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StaticChunkingStrategy
Available on (crate features assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl<'de> Deserialize<'de> for StaticChunkingStrategy
Available on (crate features
assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.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
Available on (crate features assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl PartialEq for StaticChunkingStrategy
Available on (crate features
assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.Source§impl Serialize for StaticChunkingStrategy
Available on (crate features assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.
impl Serialize for StaticChunkingStrategy
Available on (crate features
assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.impl StructuralPartialEq for StaticChunkingStrategy
Available on (crate features
assistant-types or vectorstore-types) and (crate features response-types or video-types or vectorstore-types or chat-completion-types or assistant-types or batch-types or audio-types or realtime-types or image-types) only.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