chunk.MarkdownChunk

A chunk extracted from a Markdown document.

Usage

Source

chunk.MarkdownChunk(
    text,
    start_index,
    end_index,
    char_count,
    context=None,
    origin=None,
    attributes=None
)

MarkdownChunk extends Chunk for use with Markdown content. It typically preserves heading context from the source document, allowing retrieval results to show where in the document hierarchy each chunk originated.

Parameter Attributes

text: str
start_index: int
end_index: int
char_count: int
context: Optional[str] = None
origin: Optional[str] = None
attributes: Optional[dict[str, Any]] = None