Struct CostOptimizedStrategy
pub struct CostOptimizedStrategy {
pub model_provider_pricing: HashMap<String, HashMap<String, f64>>,
pub required_vision: bool,
pub required_tools: bool,
}Fields§
§model_provider_pricing: HashMap<String, HashMap<String, f64>>Per-provider pricing data (model_provider name → user-keyed pricing map).
required_vision: boolWhether the request requires vision support.
required_tools: boolWhether the request requires native tool support.
Implementations§
Source§impl CostOptimizedStrategy
impl CostOptimizedStrategy
Sourcepub fn new(
model_provider_pricing: HashMap<String, HashMap<String, f64>>,
) -> CostOptimizedStrategy
pub fn new( model_provider_pricing: HashMap<String, HashMap<String, f64>>, ) -> CostOptimizedStrategy
Create a new cost-optimized strategy with the given per-provider pricing data.
Sourcepub fn with_vision(self, required: bool) -> CostOptimizedStrategy
pub fn with_vision(self, required: bool) -> CostOptimizedStrategy
Set whether vision support is required.
Sourcepub fn with_tools(self, required: bool) -> CostOptimizedStrategy
pub fn with_tools(self, required: bool) -> CostOptimizedStrategy
Set whether native tool support is required.
Trait Implementations§
Source§impl Clone for CostOptimizedStrategy
impl Clone for CostOptimizedStrategy
Source§fn clone(&self) -> CostOptimizedStrategy
fn clone(&self) -> CostOptimizedStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CostOptimizedStrategy
impl RefUnwindSafe for CostOptimizedStrategy
impl Send for CostOptimizedStrategy
impl Sync for CostOptimizedStrategy
impl Unpin for CostOptimizedStrategy
impl UnsafeUnpin for CostOptimizedStrategy
impl UnwindSafe for CostOptimizedStrategy
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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