pub struct ModelDatabase { /* private fields */ }Implementations§
Source§impl ModelDatabase
impl ModelDatabase
Sourcepub fn embedded() -> Self
pub fn embedded() -> Self
Load only the compile-time embedded model list (no cache). Used internally by the updater to determine which models are already known.
Sourcepub fn new() -> Self
pub fn new() -> Self
Load the embedded model list and merge any locally cached models.
Cached models are appended after the embedded ones; if an ID already exists in the embedded list it is skipped to avoid duplication. Silently ignores a missing or corrupt cache file.
pub fn get_all_models(&self) -> &Vec<LlmModel>
pub fn find_model(&self, query: &str) -> Vec<&LlmModel>
pub fn models_fitting_system( &self, available_ram_gb: f64, has_gpu: bool, vram_gb: Option<f64>, ) -> Vec<&LlmModel>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelDatabase
impl RefUnwindSafe for ModelDatabase
impl Send for ModelDatabase
impl Sync for ModelDatabase
impl Unpin for ModelDatabase
impl UnsafeUnpin for ModelDatabase
impl UnwindSafe for ModelDatabase
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