pub enum EmbeddingProviderEnum {
Gemini(GeminiClient),
OpenAI(OpenAIClient),
}Expand description
Unified embedding provider that wraps concrete implementations.
This enum allows runtime selection of embedding providers while
implementing the EmbeddingProvider trait.
Variants§
Gemini(GeminiClient)
Google Gemini embedding provider (768 dimensions).
OpenAI(OpenAIClient)
OpenAI embedding provider (1536 or 3072 dimensions).
Implementations§
Source§impl EmbeddingProviderEnum
impl EmbeddingProviderEnum
Trait Implementations§
Source§impl Clone for EmbeddingProviderEnum
impl Clone for EmbeddingProviderEnum
Source§fn clone(&self) -> EmbeddingProviderEnum
fn clone(&self) -> EmbeddingProviderEnum
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 moreSource§impl EmbeddingProvider for EmbeddingProviderEnum
impl EmbeddingProvider for EmbeddingProviderEnum
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Returns the provider identifier for logging and configuration. Read more
Source§fn dimension(&self) -> usize
fn dimension(&self) -> usize
Returns the embedding dimension this provider generates. Read more
Auto Trait Implementations§
impl Freeze for EmbeddingProviderEnum
impl !RefUnwindSafe for EmbeddingProviderEnum
impl Send for EmbeddingProviderEnum
impl Sync for EmbeddingProviderEnum
impl Unpin for EmbeddingProviderEnum
impl !UnwindSafe for EmbeddingProviderEnum
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