pub struct EmbeddingConfig {
pub provider: String,
pub dimension: usize,
pub model_ttl_secs: u64,
}Expand description
Embedding provider configuration (RFC-012).
Controls which embedding model is used for semantic search.
When embedding-mlx feature is enabled and provider = "mlx",
uses EmbeddingGemma-300m via MLX on Apple Silicon.
Otherwise falls back to TF-IDF.
Fields§
§provider: StringEmbedding provider: “tfidf” (default) or “mlx” (Apple Silicon).
dimension: usizeMatryoshka dimension: 128, 256, 512, or 768. Only used when provider = “mlx”.
model_ttl_secs: u64Model TTL in seconds. Unloaded after this duration of inactivity. Only used when provider = “mlx”.
Trait Implementations§
Source§impl Clone for EmbeddingConfig
impl Clone for EmbeddingConfig
Source§fn clone(&self) -> EmbeddingConfig
fn clone(&self) -> EmbeddingConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EmbeddingConfig
impl Debug for EmbeddingConfig
Source§impl Default for EmbeddingConfig
impl Default for EmbeddingConfig
Source§impl<'de> Deserialize<'de> for EmbeddingConfig
impl<'de> Deserialize<'de> for EmbeddingConfig
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 EmbeddingConfig
impl RefUnwindSafe for EmbeddingConfig
impl Send for EmbeddingConfig
impl Sync for EmbeddingConfig
impl Unpin for EmbeddingConfig
impl UnsafeUnpin for EmbeddingConfig
impl UnwindSafe for EmbeddingConfig
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