pub struct OllamaClient { /* private fields */ }Expand description
Minimal client for Ollama’s native chat endpoint.
Implementations§
Source§impl OllamaClient
impl OllamaClient
Sourcepub fn with_endpoint(endpoint: impl Into<String>) -> Self
pub fn with_endpoint(endpoint: impl Into<String>) -> Self
Construct with the default local endpoint and OLLAMA_MODEL (or the
fallback) as the model tag.
Trait Implementations§
Source§impl Clone for OllamaClient
impl Clone for OllamaClient
Source§fn clone(&self) -> OllamaClient
fn clone(&self) -> OllamaClient
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 Debug for OllamaClient
impl Debug for OllamaClient
Source§impl LlmClient for OllamaClient
impl LlmClient for OllamaClient
Source§fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
max_tokens: u32,
) -> Pin<Box<dyn Future<Output = Result<CompletionResult, LlmError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
max_tokens: u32,
) -> Pin<Box<dyn Future<Output = Result<CompletionResult, LlmError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run a single non-streaming completion.
Auto Trait Implementations§
impl Freeze for OllamaClient
impl !RefUnwindSafe for OllamaClient
impl Send for OllamaClient
impl Sync for OllamaClient
impl Unpin for OllamaClient
impl UnsafeUnpin for OllamaClient
impl !UnwindSafe for OllamaClient
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