ractogateway.rag.readers.image_reader
Image reader — uses Pillow (lazy import) to extract metadata.
Images are represented as a textual description of their EXIF/metadata,
plus an optional prompt to an LLM for visual description. Pixel data is
not stored in the Document; use RactoFile
for multimodal vision calls.
Install with: pip install ractogateway[rag-image]
- class ractogateway.rag.readers.image_reader.ImageReader(include_exif=True)[source]
Bases:
BaseReaderExtract metadata from image files and represent them as text Documents.
The resulting
Document.contentis a human-readable summary of image properties (size, mode, format, EXIF tags). Pass the image to a vision LLM separately usingRactoFilefor actual visual understanding.Accepts a file path (
str/Path), rawbytes, or any binary file-like object with a.read()method.- Parameters:
include_exif (
bool) – Whether to extract and include EXIF metadata in the content.