pub struct RagConfig {
pub enabled: bool,
pub provider: String,
pub api_endpoint: Option<String>,
pub api_key: Option<String>,
pub model: Option<String>,
pub max_tokens: usize,
pub temperature: f64,
pub context_window: usize,
pub caching: bool,
pub cache_ttl_secs: u64,
pub timeout_secs: u64,
pub max_retries: usize,
}
Expand description
RAG configuration
Fields§
§enabled: bool
Enable RAG by default
provider: String
LLM provider (openai, anthropic, ollama, openai_compatible)
api_endpoint: Option<String>
API endpoint for LLM
api_key: Option<String>
API key for LLM
model: Option<String>
Model name
max_tokens: usize
Maximum tokens for generation
temperature: f64
Temperature for generation (0.0 to 2.0)
context_window: usize
Context window size
caching: bool
Enable caching
cache_ttl_secs: u64
Cache TTL in seconds
timeout_secs: u64
Request timeout in seconds
max_retries: usize
Maximum 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