pub struct EmbeddingConfig {
pub provider: String,
pub model: String,
pub api_key_env: String,
pub base_url: Option<String>,
pub dimension: Option<usize>,
pub cache_dir: Option<String>,
}Expand description
Configuration for embedding generation (optional).
When configured under [memory.embedding], enables hybrid retrieval
(BM25 + vector cosine) for improved recall quality.
Fields§
§provider: StringProvider name: “openai”, “local”, or “none” (default).
model: StringModel name for the embedding API.
api_key_env: StringEnvironment variable name containing the API key.
base_url: Option<String>Base URL for the embedding API (optional, defaults to OpenAI).
dimension: Option<usize>Embedding vector dimension (auto-detected from model if omitted).
cache_dir: Option<String>Model cache directory for local embedding provider (optional).
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<'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