pub enum EmbedderDefinition {
Precomputed,
CandleBert {
model: String,
},
CandleClip {
model: String,
},
Openai {
model: String,
},
}Expand description
A declarative embedder definition stored in the schema.
Each variant maps to a concrete Embedder
implementation. The type tag selects the variant; additional fields
provide type-specific configuration.
§API Key Handling
For embedders that require API keys (e.g. OpenAI), the key is read from an environment variable at engine initialization time, not stored in the schema.
Variants§
Precomputed
Pre-computed vectors — no embedding is performed. Use this when vectors are computed externally and passed directly.
CandleBert
Candle-based BERT embedder for text embedding.
Requires the embeddings-candle feature.
CandleClip
Candle-based CLIP multimodal embedder for text and image embedding.
Requires the embeddings-multimodal feature.
Openai
OpenAI API embedder for text embedding.
Requires the embeddings-openai feature.
The API key is read from the OPENAI_API_KEY environment variable.
Trait Implementations§
Source§impl Clone for EmbedderDefinition
impl Clone for EmbedderDefinition
Source§fn clone(&self) -> EmbedderDefinition
fn clone(&self) -> EmbedderDefinition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EmbedderDefinition
impl Debug for EmbedderDefinition
Source§impl<'de> Deserialize<'de> for EmbedderDefinition
impl<'de> Deserialize<'de> for EmbedderDefinition
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>,
Auto Trait Implementations§
impl Freeze for EmbedderDefinition
impl RefUnwindSafe for EmbedderDefinition
impl Send for EmbedderDefinition
impl Sync for EmbedderDefinition
impl Unpin for EmbedderDefinition
impl UnsafeUnpin for EmbedderDefinition
impl UnwindSafe for EmbedderDefinition
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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,
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.