InstalledModelRepository

Trait InstalledModelRepository 

Source
pub trait InstalledModelRepository<DB: Database>: DatabaseRepository<DB> {
    // Required methods
    fn get_all_installed_models<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<InstalledModel>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_installed_model_by_model_id<'life0, 'async_trait>(
        &'life0 self,
        model_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<InstalledModel>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn install_model<'life0, 'life1, 'async_trait>(
        &'life0 self,
        installed_model: &'life1 InstalledModel,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update_installed_model<'life0, 'life1, 'async_trait>(
        &'life0 self,
        installed_model: &'life1 InstalledModel,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn uninstall_model<'life0, 'async_trait>(
        &'life0 self,
        model_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_installed_models_by_status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        status: &'life1 ModelStatus,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<InstalledModel>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update_model_usage<'life0, 'async_trait>(
        &'life0 self,
        model_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

已安装模型数据库仓库

Required Methods§

Source

fn get_all_installed_models<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<InstalledModel>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取所有已安装模型

Source

fn get_installed_model_by_model_id<'life0, 'async_trait>( &'life0 self, model_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<InstalledModel>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

根据模型ID获取已安装模型

Source

fn install_model<'life0, 'life1, 'async_trait>( &'life0 self, installed_model: &'life1 InstalledModel, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

安装模型

Source

fn update_installed_model<'life0, 'life1, 'async_trait>( &'life0 self, installed_model: &'life1 InstalledModel, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

更新已安装模型

Source

fn uninstall_model<'life0, 'async_trait>( &'life0 self, model_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

卸载模型

Source

fn get_installed_models_by_status<'life0, 'life1, 'async_trait>( &'life0 self, status: &'life1 ModelStatus, ) -> Pin<Box<dyn Future<Output = Result<Vec<InstalledModel>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

按状态获取已安装模型

Source

fn update_model_usage<'life0, 'async_trait>( &'life0 self, model_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

更新模型使用统计

Implementors§