pub struct LocalProvider {
model_name: String,
dims: usize,
}Expand description
Embedding provider for local inference (fastembed on primary platforms, tract on musl/Intel Mac).
Models are downloaded on first use from Hugging Face and cached. After initial download, no network calls are needed — embeddings run entirely offline. No system dependencies: ORT is bundled (fastembed) or pure Rust (tract).
Fields§
§model_name: String§dims: usizeImplementations§
Source§impl LocalProvider
impl LocalProvider
pub fn new(config: &EmbeddingConfig) -> Result<Self>
Trait Implementations§
Source§impl EmbeddingProvider for LocalProvider
Available on crate features local-embeddings-fastembed or local-embeddings-tract only.
impl EmbeddingProvider for LocalProvider
Available on crate features
local-embeddings-fastembed or local-embeddings-tract only.Auto Trait Implementations§
impl Freeze for LocalProvider
impl RefUnwindSafe for LocalProvider
impl Send for LocalProvider
impl Sync for LocalProvider
impl Unpin for LocalProvider
impl UnwindSafe for LocalProvider
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