document.ChunkedDocument

A document with an attached sequence of chunks.

Usage

Source

document.ChunkedDocument()

This is the explicit chunked variant of Document, used by stores and chunkers that operate on pre-segmented content.

Parameter Attributes

content: str
origin: Optional[str] = None
attributes: Optional[dict[str, Any]] = None
chunks: list[Chunk]

Methods

Name Description
from_any() Convert any chunked document-like object to a raghilda ChunkedDocument.

from_any()

Convert any chunked document-like object to a raghilda ChunkedDocument.

Usage

Source

from_any(doc)

Use Document.from_any() for unchunked inputs.