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