pub struct OllamaProvider {
model: String,
dims: usize,
url: String,
}Expand description
Embedding provider using a local Ollama instance.
Calls POST /api/embed on the configured Ollama URL (default: http://localhost:11434).
Requires Ollama to be running with an embedding model pulled (e.g. ollama pull nomic-embed-text).
Fields§
§model: String§dims: usize§url: StringImplementations§
Source§impl OllamaProvider
impl OllamaProvider
pub fn new(config: &EmbeddingConfig) -> Result<Self>
Trait Implementations§
Source§impl EmbeddingProvider for OllamaProvider
impl EmbeddingProvider for OllamaProvider
Auto Trait Implementations§
impl Freeze for OllamaProvider
impl RefUnwindSafe for OllamaProvider
impl Send for OllamaProvider
impl Sync for OllamaProvider
impl Unpin for OllamaProvider
impl UnwindSafe for OllamaProvider
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