pub struct RagConfig {Show 36 fields
pub db_backend: DbBackend,
pub database_url: String,
pub embed_provider: EmbedProvider,
pub embed_model: String,
pub embed_dim: usize,
pub ollama_base_url: String,
pub gemini_api_key: Option<String>,
pub gemini_model: String,
pub embed_onnx_path: String,
pub embed_tokenizer_path: String,
pub openrouter_api_key: Option<String>,
pub openrouter_base_url: String,
pub llm_model: String,
pub ocr_lang: OcrLang,
pub chunker: ChunkerKind,
pub chunk_size: usize,
pub chunk_overlap: f32,
pub chunk_unit: ChunkUnit,
pub chunk_tokenizer: Option<String>,
pub retrieval_mode: RetrievalMode,
pub top_k: usize,
pub rrf_k: f32,
pub multiquery_n: usize,
pub bm25_k1: f32,
pub bm25_b: f32,
pub source: SourceKind,
pub source_path: String,
pub source_url: Option<String>,
pub source_user: Option<String>,
pub source_password: Option<String>,
pub documents_output: Option<String>,
pub queue: QueueKind,
pub rabbitmq_url: Option<String>,
pub redis_url: Option<String>,
pub http_addr: String,
pub api_keys: Vec<String>,
}Expand description
The fully-resolved configuration for a RAG session.
Fields§
§db_backend: DbBackend§database_url: String§embed_provider: EmbedProvider§embed_model: String§embed_dim: usize§ollama_base_url: String§gemini_api_key: Option<String>§gemini_model: String§embed_onnx_path: String§embed_tokenizer_path: String§openrouter_api_key: Option<String>§openrouter_base_url: String§llm_model: String§ocr_lang: OcrLangOCR recognition language (RAG_OCR_LANG): en (default — English
PP-OCRv3, docling-pdf’s own default) or ch (the multilingual
conformance-validated model; weak Latin word spacing). Maps onto
docling-pdf’s DOCLING_RS_OCR_LANG — explicit DOCLING_OCR_* env
overrides always win.
chunker: ChunkerKind§chunk_size: usize§chunk_overlap: f32§chunk_unit: ChunkUnit§chunk_tokenizer: Option<String>Path to a HuggingFace tokenizer.json for the hybrid chunker’s token
counts (RAG_CHUNK_TOKENIZER). Required when chunker = hybrid.
retrieval_mode: RetrievalMode§top_k: usize§rrf_k: f32§multiquery_n: usize§bm25_k1: f32BM25 term-frequency saturation (RAG_BM25_K1, default 1.2).
bm25_b: f32BM25 length normalization (RAG_BM25_B, default 0.75).
source: SourceKind§source_path: String§source_url: Option<String>§source_user: Option<String>§source_password: Option<String>§documents_output: Option<String>Optional folder to dump each ingested document’s converted Markdown into
(for debugging / re-ingestion). None disables the dump.
queue: QueueKind§rabbitmq_url: Option<String>§redis_url: Option<String>§http_addr: StringBind address for serve (default 127.0.0.1:8080).
api_keys: Vec<String>Accepted API keys (comma-separated in RAG_API_KEYS). The server refuses
to start with an empty list — auth is fail-closed.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for RagConfig
impl Freeze for RagConfig
impl Move for RagConfig
impl RefUnwindSafe for RagConfig
impl Send for RagConfigwhere
RawVecInner: Send,
impl Sync for RagConfigwhere
RawVecInner: Sync,
impl Unpin for RagConfig
impl UnsafeUnpin for RagConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for RagConfigwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more