Batch Operations
batch_get_chunks
Retrieve specific chunks by their document ID and chunk number
batch_get_chunks
Retrieve specific chunks by their document ID and chunk number in a single batch operation.
Parameters
sources
(List[Union[ChunkSource, Dict[str, Any]]]): List of ChunkSource objects or dictionaries with document_id and chunk_number
Returns
List[FinalChunkResult]
: List of chunk results
Example
FinalChunkResult Properties
Each FinalChunkResult
object in the returned list has the following properties:
content
(str | PILImage): Chunk content (text or image)score
(float): Relevance scoredocument_id
(str): Parent document IDchunk_number
(int): Chunk sequence numbermetadata
(Dict[str, Any]): Document metadatacontent_type
(str): Content typefilename
(Optional[str]): Original filenamedownload_url
(Optional[str]): URL to download full document