pub struct ModelRecommender { /* private fields */ }Expand description
Model recommender service
Implementations§
Source§impl ModelRecommender
impl ModelRecommender
pub fn new() -> Self
Sourcepub fn set_preferences(&mut self, preferences: UserPreferences)
pub fn set_preferences(&mut self, preferences: UserPreferences)
Update user preferences
Sourcepub fn get_preferences(&self) -> &UserPreferences
pub fn get_preferences(&self) -> &UserPreferences
Get current user preferences
Sourcepub fn detect_hardware_profile(config: &Config) -> HardwareProfile
pub fn detect_hardware_profile(config: &Config) -> HardwareProfile
Detect hardware profile from system configuration
Sourcepub fn score_model_compatibility(
&self,
model: &ModelInfo,
hardware: &HardwareProfile,
) -> f32
pub fn score_model_compatibility( &self, model: &ModelInfo, hardware: &HardwareProfile, ) -> f32
Score a model’s compatibility with current hardware
Sourcepub fn get_recommendations(
&self,
models: Vec<&ModelInfo>,
hardware: &HardwareProfile,
max_results: usize,
) -> Vec<(String, f32)>
pub fn get_recommendations( &self, models: Vec<&ModelInfo>, hardware: &HardwareProfile, max_results: usize, ) -> Vec<(String, f32)>
Get top recommended models for current hardware and preferences
Sourcepub fn get_hardware_recommendation_message(
&self,
hardware: &HardwareProfile,
) -> String
pub fn get_hardware_recommendation_message( &self, hardware: &HardwareProfile, ) -> String
Get hardware recommendations message
Auto Trait Implementations§
impl Freeze for ModelRecommender
impl RefUnwindSafe for ModelRecommender
impl Send for ModelRecommender
impl Sync for ModelRecommender
impl Unpin for ModelRecommender
impl UnsafeUnpin for ModelRecommender
impl UnwindSafe for ModelRecommender
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