RAG Builder • Rust AI Agent SDK

RAGBuilder: Builder for RAG

RAGBuilder

Defined in the RAG module.

Rust AI Agent SDK

Builder for RAG

Fields

NameTypeDescription
configRAGConfig–
modelOption<String>–
sourcesVec<String>–

Methods

config

rust
fn config(mut self, config: RAGConfig) -> Self

Set the configuration

Parameters:

NameType
configRAGConfig

model

rust
fn model(mut self, model: impl Into<String>) -> Self

Set the model

Parameters:

NameType
modelimpl Into&lt;String&gt;

source

rust
fn source(mut self, source: impl Into<String>) -> Self

Add a source

Parameters:

NameType
sourceimpl Into&lt;String&gt;

build

rust
fn build(self) -> Result<RAG>

Build the RAG pipeline

Source

View on GitHub

praisonai/src/rag/mod.rs at line 564


Related Documentation