Version: 0.0.5 (stable)
agrag.loaders
Document loaders: turn files, directories and raw text into Documents.
The docling loaders live in agrag.loaders.docling. PDF and image files need the
docling extra.
Modules:
- base – The Loader interface: reads one source and yields Document objects.
- chat – Chat reader: JSON Lines or JSON messages, one section for each message.
- common – Shared helpers for the corpus readers.
- decode – The four-step decode pipeline for source bytes.
- defaults – The loaders that the corpus registry holds by default.
- docling – The docling loaders.
- errors – Errors that the ingestion layer raises.
- loader_registry – The extension-to-loader registry.
- prose – Prose readers: plain text and XML.
- records – Record readers: CSV, TSV, JSON Lines, and JSON.
- types – Plumbing types for the document loaders.
- walk – Corpus walk, batching, and resumable streaming.
Classes:
- ChatLoader – Reads a file of chat messages as one document with a section for each message.
- CsvLoader – Reads CSV and TSV files as one record document per row.
- DecodeError – The source bytes do not decode to text.
- DocumentConversionError – A loader could not parse or convert a source's content.
- DocumentTooLargeError – A prose source is larger than the configured byte limit.
- ErrorPolicy – The action to take when one source in a batch fails.
- IngestResult – The result of one ingest call.
- IngestionError – The base class for every ingestion error.
- JsonLoader – Reads JSON files, disambiguating arrays from objects.
- JsonlLoader – Reads JSON Lines files as one document per line.
- LoadStats – Running tally of a corpus walk.
- LoaderRegistry – Maps each source extension to the one loader that reads it.
- MalformedRecordError – One record in a record-family source does not parse.
- MissingExtraError – A loader exists for this format, but its package extra is not installed.
- ReadOptions – Per-source reader configuration.
- TextLoader – Reads plain-text and log files as one document each.
- UnsupportedFormatError – No registered loader can read this source's format.
- XmlLoader – Reads an XML file as the text of its elements.
Functions:
- register_default_loaders – Register every default loader on a registry.
Attributes:
- registry –