RAG
Defined in the RAG module.Rust AI Agent SDK Main RAG pipeline.
Fields
| Name | Type | Description |
|---|---|---|
config | RAGConfig | Configuration |
model | String | LLM model for generation |
sources | Vec<String> | Knowledge sources |
Methods
new
query
| Name | Type |
|---|---|
question | &str |
add_source
| Name | Type |
|---|---|
source | impl Into<String> |
build_context
| Name | Type |
|---|---|
chunks | &[ContextChunk] |
truncate_context
| Name | Type |
|---|---|
context | &str |
max_tokens | usize |
Source
View on GitHub
praisonai/src/rag/mod.rs at line 467
