pub struct RagConfig {Show 15 fields
pub provider: LlmProvider,
pub api_endpoint: String,
pub api_key: Option<String>,
pub model: String,
pub max_tokens: usize,
pub temperature: f64,
pub context_window: usize,
pub semantic_search_enabled: bool,
pub embedding_provider: EmbeddingProvider,
pub embedding_model: String,
pub embedding_endpoint: Option<String>,
pub similarity_threshold: f64,
pub max_chunks: usize,
pub request_timeout_seconds: u64,
pub max_retries: usize,
}
Expand description
RAG configuration
Fields§
§provider: LlmProvider
LLM provider
api_endpoint: String
LLM API endpoint
api_key: Option<String>
API key for authentication
model: String
Model name to use
max_tokens: usize
Maximum tokens for generation
temperature: f64
Temperature for generation
context_window: usize
Context window size
semantic_search_enabled: bool
Whether to use semantic search instead of keyword search
embedding_provider: EmbeddingProvider
Embedding provider for semantic search
embedding_model: String
Embedding model to use
embedding_endpoint: Option<String>
Embedding API endpoint (if different from LLM endpoint)
similarity_threshold: f64
Similarity threshold for semantic search (0.0 to 1.0)
max_chunks: usize
Maximum number of chunks to retrieve for semantic search
request_timeout_seconds: u64
Request timeout in seconds
max_retries: usize
Maximum number of retries for failed requests
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RagConfig
impl<'de> Deserialize<'de> for RagConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RagConfig
impl RefUnwindSafe for RagConfig
impl Send for RagConfig
impl Sync for RagConfig
impl Unpin for RagConfig
impl UnwindSafe for RagConfig
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
Mutably borrows from an owned value. Read more