pub struct RagConfig {
pub top_k: usize,
pub min_similarity: f32,
pub max_tokens: usize,
pub timeout_seconds: u64,
pub retrieval_trigger: RetrievalTrigger,
}Expand description
Unified configuration for RAG (Retrieval-Augmented Generation).
Combines the application-level settings (formerly in application_settings.rs)
and the service-level configuration (formerly in rag_retrieval_service.rs).
Fields§
§top_k: usizeNumber of top results to retrieve from Sanctum.
min_similarity: f32Minimum similarity score threshold (0.0–1.0).
max_tokens: usizeMaximum tokens to include in the RAG context.
timeout_seconds: u64Timeout for RAG retrieval in seconds.
retrieval_trigger: RetrievalTriggerWhen to trigger memory retrieval.
Implementations§
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 UnsafeUnpin 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