Recursive Chunker
Recursively chunks documents into smaller chunks. It is a good choice for documents that are long but well structured.
Authorizations
Your API Key from the Chonkie Cloud dashboard
Body
The file to chunk.
Tokenizer or token counting function to use. Can be a string identifier or an instance.
Maximum number of tokens per chunk.
Pre-defined rules for chunking. Find all recipes on our Hugging Face Hub.
Language of the text, used with recipes. Must match the language of the recipe.
Minimum number of characters per chunk.
Whether to return chunks as text strings or as RecursiveChunk
objects.
texts
, chunks
Response
The actual text content of the chunk.
The starting character index of the chunk within the original input text.
The ending character index (exclusive) of the chunk within the original input text.
The number of tokens in this specific chunk, according to the tokenizer used.
The level of this chunk in the recursive splitting process (starts from 0).