zeph_memory/document/
mod.rs1pub mod error;
5pub mod loader;
6pub mod pipeline;
7pub mod splitter;
8pub mod types;
9
10pub use error::DocumentError;
11pub use loader::TextLoader;
12pub use pipeline::IngestionPipeline;
13pub use splitter::{SplitterConfig, TextSplitter};
14pub use types::{Chunk, Document, DocumentMetadata};
15
16#[cfg(feature = "pdf")]
17pub use loader::PdfLoader;
18
19pub const DEFAULT_MAX_FILE_SIZE: u64 = 50 * 1024 * 1024;
21
22pub trait DocumentLoader: Send + Sync {
23 fn load(
24 &self,
25 path: &std::path::Path,
26 ) -> std::pin::Pin<
27 Box<dyn std::future::Future<Output = Result<Vec<Document>, DocumentError>> + Send + '_>,
28 >;
29
30 fn supported_extensions(&self) -> &[&str];
31}