pub trait Chunker: Send + Sync {
// Required method
fn chunk(&self, document: &Document) -> Vec<Chunk>;
}Available on crate feature
rag only.Expand description
A strategy for splitting documents into chunks.
Implementations produce Chunks with text and metadata but no embeddings.
Embeddings are attached later by the pipeline.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".