pub enum EmbeddingBackend {
FastEmbed,
Model2Vec,
None,
}Expand description
The embedding backend selector ([local_ai.embedding] model = "...").
FastEmbed(default): MiniLM transformer — best quality, but the cold backfill is CPU-bound (~10-100 chunks/sec), so impractical for very large repos.Model2Vec: static token-vector lookup + mean-pool — ~100-500× faster on CPU at some retrieval-quality cost (no context/word-order). The choice for huge repos that still want vectors.None: structural + BM25 only; no dense vectors.semantic_searchdegrades to BM25. The cheapest option for enormous codebases where any embedding backfill is too slow.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for EmbeddingBackend
impl Clone for EmbeddingBackend
Source§fn clone(&self) -> EmbeddingBackend
fn clone(&self) -> EmbeddingBackend
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 moreimpl Copy for EmbeddingBackend
Source§impl Debug for EmbeddingBackend
impl Debug for EmbeddingBackend
Source§impl Default for EmbeddingBackend
impl Default for EmbeddingBackend
Source§fn default() -> EmbeddingBackend
fn default() -> EmbeddingBackend
Returns the “default value” for a type. Read more
impl Eq for EmbeddingBackend
Source§impl FromStr for EmbeddingBackend
impl FromStr for EmbeddingBackend
Source§impl PartialEq for EmbeddingBackend
impl PartialEq for EmbeddingBackend
Source§fn eq(&self, other: &EmbeddingBackend) -> bool
fn eq(&self, other: &EmbeddingBackend) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EmbeddingBackend
Auto Trait Implementations§
impl Freeze for EmbeddingBackend
impl RefUnwindSafe for EmbeddingBackend
impl Send for EmbeddingBackend
impl Sync for EmbeddingBackend
impl Unpin for EmbeddingBackend
impl UnsafeUnpin for EmbeddingBackend
impl UnwindSafe for EmbeddingBackend
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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