pub struct ModelManager { /* private fields */ }Expand description
The main struct that makes our AI models feel special.
Implementations§
Source§impl ModelManager
impl ModelManager
Sourcepub fn new(base_url: String) -> Result<Self, KowalskiError>
pub fn new(base_url: String) -> Result<Self, KowalskiError>
Creates a new model manager with the specified base URL.
Sourcepub async fn list_models(&self) -> Result<ModelsResponse, KowalskiError>
pub async fn list_models(&self) -> Result<ModelsResponse, KowalskiError>
Lists available models
Sourcepub async fn model_exists(
&self,
model_name: &str,
) -> Result<bool, KowalskiError>
pub async fn model_exists( &self, model_name: &str, ) -> Result<bool, KowalskiError>
Checks if a model exists
Sourcepub async fn pull_model(
&self,
model_name: &str,
) -> Result<PullResponse, KowalskiError>
pub async fn pull_model( &self, model_name: &str, ) -> Result<PullResponse, KowalskiError>
Pulls a model from the server
Auto Trait Implementations§
impl Freeze for ModelManager
impl !RefUnwindSafe for ModelManager
impl Send for ModelManager
impl Sync for ModelManager
impl Unpin for ModelManager
impl !UnwindSafe for ModelManager
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