pub struct OllamaProvider { /* private fields */ }Expand description
Ollama API provider
Ollama runs local LLMs and provides an API at http://localhost:11434 It can also be configured to save conversation history.
Implementations§
Trait Implementations§
Source§impl ChatProvider for OllamaProvider
impl ChatProvider for OllamaProvider
Source§fn provider_type(&self) -> ProviderType
fn provider_type(&self) -> ProviderType
Get the provider type
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if this provider is available/configured
Source§fn sessions_path(&self) -> Option<PathBuf>
fn sessions_path(&self) -> Option<PathBuf>
Get the base path where sessions are stored
Source§fn list_sessions(&self) -> Result<Vec<ChatSession>>
fn list_sessions(&self) -> Result<Vec<ChatSession>>
List all chat sessions from this provider
Source§fn import_session(&self, _session_id: &str) -> Result<ChatSession>
fn import_session(&self, _session_id: &str) -> Result<ChatSession>
Import a session from this provider into CSM format
Source§fn export_session(&self, _session: &ChatSession) -> Result<()>
fn export_session(&self, _session: &ChatSession) -> Result<()>
Export a CSM session to this provider’s format
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
Source§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