Auto RAG Agent • Rust AI Agent SDK
AutoRagAgent: Auto RAG agent for automatic RAG setup
AutoRagAgent
Defined in the specialized module.
Rust AI Agent SDK
Auto RAG agent for automatic RAG setup
Fields
| Name | Type | Description |
|---|---|---|
config | AutoRagConfig | Configuration |
sources | Vec<String> | Document sources |
indexed | bool | Indexed |
Methods
new
fn new(config: AutoRagConfig) -> SelfCreate a new AutoRAG agent
Parameters:
| Name | Type |
|---|---|
config | AutoRagConfig |
add_source
fn add_source(&mut self, source: impl Into<String>) -> ()Add a document source
Parameters:
| Name | Type |
|---|---|
source | impl Into<String> |
add_sources
fn add_sources(&mut self, sources: impl IntoIterator<Item = impl Into<String>>) -> ()Add multiple sources
Parameters:
| Name | Type |
|---|---|
sources | impl IntoIterator<Item |
index
fn index(&mut self) -> Result<(), String>Index documents
query
fn query(&self, query: &str) -> Result<Vec<String>, String>Query the RAG system
Parameters:
| Name | Type |
|---|---|
query | &str |
is_indexed
fn is_indexed(&self) -> boolCheck if indexed
sources
fn sources(&self) -> &[String]Get sources
Source
View on GitHubpraisonai/src/parity/specialized.rs at line 436