Skip to main content

Parameters

  • sources (List[Union[ChunkSource, Dict[str, Any]]]): List of ChunkSource objects or dictionaries with document_id and chunk_number
  • folder_name (str | List[str], optional): Optional folder scope. Accepts canonical paths or a list of paths/names.
  • use_colpali (bool, optional): Whether to request multimodal chunks when available. Defaults to True.
  • output_format (str, optional): Controls how image chunks are returned. Set to "url" to receive presigned URLs; omit or set to "base64" (default) to receive base64 content.

Returns

  • List[FinalChunkResult]: List of chunk results

Examples

FinalChunkResult Properties

Each FinalChunkResult object in the returned list has the following properties:
  • content (str | PILImage): Chunk content (text or image)
  • score (float): Relevance score
  • document_id (str): Parent document ID
  • chunk_number (int): Chunk sequence number
  • metadata (Dict[str, Any]): Document metadata
  • content_type (str): Content type
  • filename (Optional[str]): Original filename
  • download_url (Optional[str]): URL to download full document