Retrieval Config • Rust AI Agent SDK
RetrievalConfig: Unified retrieval configuration (Agent-first).
RetrievalConfig
Defined in the RAG module.
Rust AI Agent SDK
Unified retrieval configuration (Agent-first).
Fields
| Name | Type | Description |
|---|---|---|
enabled | bool | Enable RAG |
rag | RAGConfig | RAG configuration |
sources | Vec<String> | Knowledge sources |
auto_retrieve | bool | Auto-retrieve on every query |
Methods
new
fn new() -> SelfCreate a new RetrievalConfig
enable
fn enable(mut self) -> SelfEnable retrieval
source
fn source(mut self, source: impl Into<String>) -> SelfAdd a source
Parameters:
| Name | Type |
|---|---|
source | impl Into<String> |
rag
fn rag(mut self, config: RAGConfig) -> SelfSet RAG config
Parameters:
| Name | Type |
|---|---|
config | RAGConfig |
Source
View on GitHubpraisonai/src/rag/mod.rs at line 302