SyncableSource
DocumentSource that supports change detection for incremental sync.
SyncableSource extends DocumentSource with version information, enabling RAG.sync() to detect which documents have changed.
Attributes
- Graph
-
- Supertypes
- Known subtypes
-
class S3DocumentSource
Members list
Value members
Abstract methods
Get version information for change detection.
Get version information for change detection.
This should return quickly without reading the full document content. For S3, use the ETag; for filesystems, use content hash + mtime.
Value parameters
- ref
-
Document reference
Attributes
- Returns
-
Version info for comparison, or error if unavailable
Inherited methods
Estimated number of documents in this source, if known.
Estimated number of documents in this source, if known.
Used for progress reporting. Return None if unknown or expensive to compute.
Attributes
- Inherited from:
- DocumentSource
Read document content as a stream.
Read document content as a stream.
Use this for large documents to avoid loading everything into memory. The caller is responsible for closing the returned stream.
Default implementation wraps readDocument; override for true streaming.
Value parameters
- ref
-
Document reference from listDocuments()
Attributes
- Returns
-
InputStream for the document content or an error
- Inherited from:
- DocumentSource
Inherited and Abstract methods
Human-readable description of this source.
Human-readable description of this source.
Used for logging and debugging (e.g., "S3(my-bucket/docs/)")
Attributes
- Inherited from:
- DocumentSource
List all document references in this source.
List all document references in this source.
Returns an iterator for streaming large document sets. Each element is either a successful DocumentRef or an error.
Attributes
- Inherited from:
- DocumentSource
Read document content into memory.
Read document content into memory.
Value parameters
- ref
-
Document reference from listDocuments()
Attributes
- Returns
-
Raw document bytes or an error
- Inherited from:
- DocumentSource