pub struct ModelRequirements {
pub max_input_cost_per_token: Option<f64>,
pub max_output_cost_per_token: Option<f64>,
pub min_context_length: Option<u64>,
pub required_capabilities: Vec<ModelCapability>,
pub preferred_family: Option<String>,
pub min_speed_score: Option<u8>,
pub min_quality_score: Option<u8>,
pub requires_vision: Option<bool>,
pub requires_tools: Option<bool>,
pub max_response_time_ms: Option<u64>,
pub preferred_languages: Vec<String>,
}
Expand description
Requirements for model selection
Fields§
§max_input_cost_per_token: Option<f64>
Maximum cost per input token
max_output_cost_per_token: Option<f64>
Maximum cost per output token
min_context_length: Option<u64>
Minimum context length required
required_capabilities: Vec<ModelCapability>
Required capabilities
preferred_family: Option<String>
Preferred model family
min_speed_score: Option<u8>
Minimum speed score
min_quality_score: Option<u8>
Minimum quality score
requires_vision: Option<bool>
Whether vision support is required
requires_tools: Option<bool>
Whether tool use support is required
max_response_time_ms: Option<u64>
Maximum acceptable response time in milliseconds
preferred_languages: Vec<String>
Preferred languages (ISO codes)
Implementations§
Source§impl ModelRequirements
impl ModelRequirements
Sourcepub fn max_input_cost_per_token(self, cost: f64) -> Self
pub fn max_input_cost_per_token(self, cost: f64) -> Self
Set maximum input cost per token
Sourcepub fn max_output_cost_per_token(self, cost: f64) -> Self
pub fn max_output_cost_per_token(self, cost: f64) -> Self
Set maximum output cost per token
Sourcepub fn min_context_length(self, length: u64) -> Self
pub fn min_context_length(self, length: u64) -> Self
Set minimum context length requirement
Sourcepub fn require_capability(self, capability: ModelCapability) -> Self
pub fn require_capability(self, capability: ModelCapability) -> Self
Add required capability
Sourcepub fn capabilities(self, capabilities: Vec<ModelCapability>) -> Self
pub fn capabilities(self, capabilities: Vec<ModelCapability>) -> Self
Set required capabilities
Sourcepub fn preferred_family(self, family: impl Into<String>) -> Self
pub fn preferred_family(self, family: impl Into<String>) -> Self
Set preferred model family
Sourcepub fn require_vision(self) -> Self
pub fn require_vision(self) -> Self
Require vision support
Sourcepub fn require_tools(self) -> Self
pub fn require_tools(self) -> Self
Require tool use support
Sourcepub fn min_quality_score(self, score: u8) -> Self
pub fn min_quality_score(self, score: u8) -> Self
Set minimum quality score
Sourcepub fn min_speed_score(self, score: u8) -> Self
pub fn min_speed_score(self, score: u8) -> Self
Set minimum speed score
Trait Implementations§
Source§impl Clone for ModelRequirements
impl Clone for ModelRequirements
Source§fn clone(&self) -> ModelRequirements
fn clone(&self) -> ModelRequirements
Returns a duplicate 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 ModelRequirements
impl Debug for ModelRequirements
Source§impl Default for ModelRequirements
impl Default for ModelRequirements
Source§fn default() -> ModelRequirements
fn default() -> ModelRequirements
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModelRequirements
impl RefUnwindSafe for ModelRequirements
impl Send for ModelRequirements
impl Sync for ModelRequirements
impl Unpin for ModelRequirements
impl UnwindSafe for ModelRequirements
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