1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! `docling-rag`: a pluggable Retrieval-Augmented-Generation subsystem built on
//! the [`docling.rs`](https://crates.io/crates/docling.rs) document converter.
//!
//! The pipeline is: **source → convert to Markdown → chunk → embed → vector store →
//! retrieve → (optionally) synthesize an answer**. Every external dependency is a
//! trait with swappable backends:
//!
//! - **Embedders** ([`embed`]): Ollama (default), Gemini, local ONNX, or a
//! deterministic hashing embedder for offline tests.
//! - **Vector stores** ([`store`]): SQLite (default), PostgreSQL + pgvector, or
//! in-memory. Documents and chunks live in separate tables.
//! - **Retrieval** ([`retrieve`]): dense vector, sparse BM25, Hybrid (RRF),
//! Multi-Query fusion, and HyDE.
//! - **LLM** ([`llm`]): OpenRouter (default model DeepSeek-V3).
//! - **Sources** ([`source`]): local folder (default), FTP, SFTP.
//! - **Queues** ([`queue`]): in-process, RabbitMQ, Redis pub/sub.
//!
//! Configuration comes from the environment / a `.env` file via [`RagConfig`].
//!
//! ```no_run
//! use docling_rag::{RagConfig, Pipeline, RetrievalMode};
//!
//! # async fn run() -> docling_rag::Result<()> {
//! let cfg = RagConfig::from_env()?;
//! let pipeline = Pipeline::from_config(&cfg).await?;
//! pipeline.ingest_all().await?;
//! let hits = pipeline.query(RetrievalMode::Hybrid, "how does chunking work?", 5).await?;
//! for h in hits {
//! println!("{:.3} {}", h.score, h.chunk.text);
//! }
//! # Ok(()) }
//! ```
pub use RagConfig;
pub use ;
pub use ;
pub use ;
pub use Retriever;