Split text into fixed-size token chunks with configurable overlap
TokenChunker
splits text into chunks based on token count, ensuring each chunk stays within specified token limits.
TokenChunker
via the API, check out the API reference documentation.
Single Text Chunking
Batch Processing
Using Custom Tokenizers
Callable Interface
Overlap Configuration
Processing Large Documents
Chunk
objects.
Chunks object include a custom Context
class for additional metadata alongside other attributes: