pub enum EmbeddingProvider {
Builtin {
model_path: Option<PathBuf>,
},
External,
}Expand description
Embedding provider configuration.
Determines how embedding vectors are generated for experiences.
Variants§
Builtin
PulseDB generates embeddings using a built-in ONNX model.
Requires the builtin-embeddings feature. The default model is
all-MiniLM-L6-v2 (384 dimensions).
External
Caller provides pre-computed embedding vectors.
Use this when you have your own embedding service (OpenAI, Cohere, etc.) or want to use a model not bundled with PulseDB.
Implementations§
Source§impl EmbeddingProvider
impl EmbeddingProvider
Sourcepub fn is_builtin(&self) -> bool
pub fn is_builtin(&self) -> bool
Returns true if this is the builtin provider.
Sourcepub fn is_external(&self) -> bool
pub fn is_external(&self) -> bool
Returns true if this is the external provider.
Trait Implementations§
Source§impl Clone for EmbeddingProvider
impl Clone for EmbeddingProvider
Source§fn clone(&self) -> EmbeddingProvider
fn clone(&self) -> EmbeddingProvider
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EmbeddingProvider
impl RefUnwindSafe for EmbeddingProvider
impl Send for EmbeddingProvider
impl Sync for EmbeddingProvider
impl Unpin for EmbeddingProvider
impl UnsafeUnpin for EmbeddingProvider
impl UnwindSafe for EmbeddingProvider
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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