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: LlmProviderLLM provider
api_endpoint: StringLLM API endpoint
api_key: Option<String>API key for authentication
model: StringModel name to use
max_tokens: usizeMaximum tokens for generation
temperature: f64Temperature for generation
context_window: usizeContext window size
semantic_search_enabled: boolWhether to use semantic search instead of keyword search
embedding_provider: EmbeddingProviderEmbedding provider for semantic search
embedding_model: StringEmbedding model to use
embedding_endpoint: Option<String>Embedding API endpoint (if different from LLM endpoint)
similarity_threshold: f64Similarity threshold for semantic search (0.0 to 1.0)
max_chunks: usizeMaximum number of chunks to retrieve for semantic search
request_timeout_seconds: u64Request timeout in seconds
max_retries: usizeMaximum 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