pub struct ModelPreferences {
pub hints: Option<Vec<ModelHint>>,
pub cost_priority: Option<f64>,
pub speed_priority: Option<f64>,
pub intelligence_priority: Option<f64>,
}
Expand description
Model preferences for sampling
Fields§
§hints: Option<Vec<ModelHint>>
Optional hints for model selection
cost_priority: Option<f64>
How much to prioritize cost when selecting a model
speed_priority: Option<f64>
How much to prioritize sampling speed when selecting a model
intelligence_priority: Option<f64>
How much to prioritize intelligence when selecting a model
Implementations§
Source§impl ModelPreferences
impl ModelPreferences
Sourcepub fn with_priorities(cost: f64, speed: f64, intelligence: f64) -> Self
pub fn with_priorities(cost: f64, speed: f64, intelligence: f64) -> Self
Create model preferences with priorities
Sourcepub fn set_cost_priority(&mut self, priority: f64)
pub fn set_cost_priority(&mut self, priority: f64)
Set the cost priority
Sourcepub fn set_speed_priority(&mut self, priority: f64)
pub fn set_speed_priority(&mut self, priority: f64)
Set the speed priority
Sourcepub fn set_intelligence_priority(&mut self, priority: f64)
pub fn set_intelligence_priority(&mut self, priority: f64)
Set the intelligence priority
Trait Implementations§
Source§impl Clone for ModelPreferences
impl Clone for ModelPreferences
Source§fn clone(&self) -> ModelPreferences
fn clone(&self) -> ModelPreferences
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ModelPreferences
impl Debug for ModelPreferences
Source§impl Default for ModelPreferences
impl Default for ModelPreferences
Source§fn default() -> ModelPreferences
fn default() -> ModelPreferences
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelPreferences
impl<'de> Deserialize<'de> for ModelPreferences
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ModelPreferences
impl PartialEq for ModelPreferences
Source§impl Serialize for ModelPreferences
impl Serialize for ModelPreferences
impl StructuralPartialEq for ModelPreferences
Auto Trait Implementations§
impl Freeze for ModelPreferences
impl RefUnwindSafe for ModelPreferences
impl Send for ModelPreferences
impl Sync for ModelPreferences
impl Unpin for ModelPreferences
impl UnwindSafe for ModelPreferences
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