pub struct LocalFastEmbedProvider;Expand description
Local embedding provider using FastEmbed (ONNX Runtime).
Supports a wide range of embedding models. Inference is offloaded to a dedicated thread with an enlarged stack to accommodate ONNX Runtime’s requirements.
Implementations§
Trait Implementations§
Source§impl Default for LocalFastEmbedProvider
impl Default for LocalFastEmbedProvider
Source§impl ModelProvider for LocalFastEmbedProvider
impl ModelProvider for LocalFastEmbedProvider
Source§fn provider_id(&self) -> &'static str
fn provider_id(&self) -> &'static str
Unique identifier for this provider (e.g.
"local/candle", "remote/openai").Source§fn capabilities(&self) -> ProviderCapabilities
fn capabilities(&self) -> ProviderCapabilities
Return the set of tasks this provider supports.
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 ModelAliasSpec,
) -> Pin<Box<dyn Future<Output = Result<LoadedModelHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 ModelAliasSpec,
) -> Pin<Box<dyn Future<Output = Result<LoadedModelHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load (or connect to) a model described by
spec and return a type-erased
handle. Read moreAuto Trait Implementations§
impl Freeze for LocalFastEmbedProvider
impl RefUnwindSafe for LocalFastEmbedProvider
impl Send for LocalFastEmbedProvider
impl Sync for LocalFastEmbedProvider
impl Unpin for LocalFastEmbedProvider
impl UnwindSafe for LocalFastEmbedProvider
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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