pub struct OllamaInferenceProvider { /* private fields */ }Implementations§
Source§impl OllamaInferenceProvider
impl OllamaInferenceProvider
Sourcepub fn new(config: OllamaProviderConfig) -> Result<Self, OllamaInferenceError>
pub fn new(config: OllamaProviderConfig) -> Result<Self, OllamaInferenceError>
Creates a local Ollama provider backed by the configured HTTP endpoint.
§Errors
Returns OllamaInferenceError when the endpoint config is invalid.
pub fn provider_implementation_id(&self) -> &'static str
Sourcepub fn check_model_available(
&self,
model: &str,
) -> Result<(), OllamaInferenceError>
pub fn check_model_available( &self, model: &str, ) -> Result<(), OllamaInferenceError>
Checks whether the configured Ollama endpoint lists the requested model.
§Errors
Returns OllamaInferenceError when the provider is unavailable, the
response is invalid, or the model is not listed by Ollama.
Sourcepub fn generate(
&self,
request: &OllamaInferenceRequest,
) -> Result<OllamaInferenceOutput, OllamaInferenceError>
pub fn generate( &self, request: &OllamaInferenceRequest, ) -> Result<OllamaInferenceOutput, OllamaInferenceError>
Invokes real local generation through Ollama.
§Errors
Returns OllamaInferenceError when config, provider availability,
model availability, provider execution, or response validation fails.
Trait Implementations§
Source§impl Clone for OllamaInferenceProvider
impl Clone for OllamaInferenceProvider
Source§fn clone(&self) -> OllamaInferenceProvider
fn clone(&self) -> OllamaInferenceProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OllamaInferenceProvider
impl Debug for OllamaInferenceProvider
impl Eq for OllamaInferenceProvider
Source§impl PartialEq for OllamaInferenceProvider
impl PartialEq for OllamaInferenceProvider
impl StructuralPartialEq for OllamaInferenceProvider
Auto Trait Implementations§
impl Freeze for OllamaInferenceProvider
impl RefUnwindSafe for OllamaInferenceProvider
impl Send for OllamaInferenceProvider
impl Sync for OllamaInferenceProvider
impl Unpin for OllamaInferenceProvider
impl UnsafeUnpin for OllamaInferenceProvider
impl UnwindSafe for OllamaInferenceProvider
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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