pub struct OllamaAdapter { /* private fields */ }Expand description
Ollama adapter for local models.
Implementations§
Source§impl OllamaAdapter
impl OllamaAdapter
Trait Implementations§
Source§impl LLMAdapter for OllamaAdapter
impl LLMAdapter for OllamaAdapter
Source§fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
messages: &'life1 [LLMMessage],
) -> Pin<Box<dyn Future<Output = Result<LLMResponse, LLMError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
messages: &'life1 [LLMMessage],
) -> Pin<Box<dyn Future<Output = Result<LLMResponse, LLMError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate a completion from messages. Read more
Source§fn generate_stream(
&self,
messages: &[LLMMessage],
) -> Pin<Box<dyn Stream<Item = Result<StreamChunk, LLMError>> + Send + '_>>
fn generate_stream( &self, messages: &[LLMMessage], ) -> Pin<Box<dyn Stream<Item = Result<StreamChunk, LLMError>> + Send + '_>>
Generate a streaming completion. Read more
Auto Trait Implementations§
impl Freeze for OllamaAdapter
impl !RefUnwindSafe for OllamaAdapter
impl Send for OllamaAdapter
impl Sync for OllamaAdapter
impl Unpin for OllamaAdapter
impl UnsafeUnpin for OllamaAdapter
impl !UnwindSafe for OllamaAdapter
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