pub enum EmbeddingModel {
MiniLmL6V2,
NomicEmbedV15,
}Expand description
Supported embedding models for semantic search.
Variants§
MiniLmL6V2
sentence-transformers/all-MiniLM-L6-v2 — 384-dim, ~90 MB
NomicEmbedV15
nomic-ai/nomic-embed-text-v1.5 — 768-dim, ~270 MB
Implementations§
Source§impl EmbeddingModel
impl EmbeddingModel
Sourcepub fn hf_model_id(&self) -> &str
pub fn hf_model_id(&self) -> &str
HuggingFace model identifier.
Sourcepub fn from_canonical_id(s: &str) -> Option<Self>
pub fn from_canonical_id(s: &str) -> Option<Self>
Parse any recognised canonical id form — the snake wire form, the
HF id, the unprefixed shortname, or the Ollama tag — into a
daemon-constructible model. Returns None for ids the 2-model
daemon embedder cannot build (e.g. bge-large-en); callers fall
back to the tier preset. Case-insensitive; surrounding whitespace
is trimmed (#1521).
Unlike [FromStr] (which only accepts the snake wire form), this
also accepts whatever an operator wrote in [embeddings].model
after [canonicalise_embedding_model], so the sectioned config
block drives the daemon embedder.
Trait Implementations§
Source§impl Clone for EmbeddingModel
impl Clone for EmbeddingModel
Source§fn clone(&self) -> EmbeddingModel
fn clone(&self) -> EmbeddingModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EmbeddingModel
Source§impl Debug for EmbeddingModel
impl Debug for EmbeddingModel
Source§impl<'de> Deserialize<'de> for EmbeddingModel
impl<'de> Deserialize<'de> for EmbeddingModel
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>,
impl Eq for EmbeddingModel
Source§impl FromStr for EmbeddingModel
impl FromStr for EmbeddingModel
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parse the snake_case wire form used by AppConfig.embedding_model
(the documented top-level override). Accepts case-insensitive input
with surrounding whitespace trimmed. Keep this in sync with the
#[serde(rename_all = "snake_case")] variants above.
Source§impl PartialEq for EmbeddingModel
impl PartialEq for EmbeddingModel
Source§fn eq(&self, other: &EmbeddingModel) -> bool
fn eq(&self, other: &EmbeddingModel) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for EmbeddingModel
impl Serialize for EmbeddingModel
impl StructuralPartialEq for EmbeddingModel
Auto Trait Implementations§
impl Freeze for EmbeddingModel
impl RefUnwindSafe for EmbeddingModel
impl Send for EmbeddingModel
impl Sync for EmbeddingModel
impl Unpin for EmbeddingModel
impl UnsafeUnpin for EmbeddingModel
impl UnwindSafe for EmbeddingModel
Blanket Implementations§
impl<T> Boilerplate for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more