pub struct ModelPreferences {
pub models: Option<Vec<String>>,
pub cost_priority: Option<CostPriority>,
pub speed_priority: Option<SpeedPriority>,
pub intelligence_priority: Option<IntelligencePriority>,
}Expand description
Model preferences for completion requests.
Fields§
§models: Option<Vec<String>>Preferred model names in order of preference
cost_priority: Option<CostPriority>Minimum cost tier acceptable
speed_priority: Option<SpeedPriority>Minimum speed tier acceptable
intelligence_priority: Option<IntelligencePriority>Minimum intelligence tier acceptable
Implementations§
Source§impl ModelPreferences
impl ModelPreferences
Sourcepub fn with_models(self, models: Vec<String>) -> Self
pub fn with_models(self, models: Vec<String>) -> Self
Set preferred models.
Sourcepub fn with_cost_priority(self, priority: CostPriority) -> Self
pub fn with_cost_priority(self, priority: CostPriority) -> Self
Set cost priority.
Sourcepub fn with_speed_priority(self, priority: SpeedPriority) -> Self
pub fn with_speed_priority(self, priority: SpeedPriority) -> Self
Set speed priority.
Sourcepub fn with_intelligence_priority(self, priority: IntelligencePriority) -> Self
pub fn with_intelligence_priority(self, priority: IntelligencePriority) -> Self
Set intelligence priority.
Trait Implementations§
Source§impl Clone for ModelPreferences
impl Clone for ModelPreferences
Source§fn clone(&self) -> ModelPreferences
fn clone(&self) -> ModelPreferences
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const 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§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 Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.