create_chunks
create_chunks
Split document content into chunks using the configured chunking strategy. Each chunk includes metadata about its source file, section, and position within the original document.
The content parameter should be the actual text content of the document,
not a file path. Use the appropriate extraction method first for binary formats.
Parameters
content
Document text content to chunk.
filename
Name of the source file, used for metadata in each chunk.
file_type
File extension or type (e.g., "md", "py", "txt").
Returns
list[dict] — A list of chunk dictionaries, each containing:
content(str) — the chunk textfilename(str) — source filenamesection(str | None) — section name or hierarchy pathstart_line(int | None) — starting line number in the sourceend_line(int | None) — ending line number in the sourcemetadata(dict) — additional metadata (file type, word count, chunk method, etc.)