pub struct LocalModelManager { /* private fields */ }Expand description
Local model manager for Ollama
Implementations§
Source§impl LocalModelManager
impl LocalModelManager
Sourcepub fn with_default_endpoint() -> Result<Self>
pub fn with_default_endpoint() -> Result<Self>
Create a new local model manager with default localhost endpoint
Sourcepub async fn pull_model(&self, model_name: &str) -> Result<Vec<PullProgress>>
pub async fn pull_model(&self, model_name: &str) -> Result<Vec<PullProgress>>
Pull a model from Ollama registry Returns a stream of progress updates
Sourcepub async fn remove_model(&self, model_name: &str) -> Result<()>
pub async fn remove_model(&self, model_name: &str) -> Result<()>
Remove a model from local storage
Sourcepub async fn update_model(&self, model_name: &str) -> Result<Vec<PullProgress>>
pub async fn update_model(&self, model_name: &str) -> Result<Vec<PullProgress>>
Update a model to the latest version
Sourcepub async fn get_model_info(&self, model_name: &str) -> Result<LocalModel>
pub async fn get_model_info(&self, model_name: &str) -> Result<LocalModel>
Get information about a specific model
Sourcepub async fn list_models(&self) -> Result<Vec<LocalModel>>
pub async fn list_models(&self) -> Result<Vec<LocalModel>>
List all available models
Sourcepub async fn model_exists(&self, model_name: &str) -> Result<bool>
pub async fn model_exists(&self, model_name: &str) -> Result<bool>
Check if a model exists
Auto Trait Implementations§
impl Freeze for LocalModelManager
impl !RefUnwindSafe for LocalModelManager
impl Send for LocalModelManager
impl Sync for LocalModelManager
impl Unpin for LocalModelManager
impl !UnwindSafe for LocalModelManager
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