pub struct ModelPricing {
pub input_cost_per_1m: f64,
pub output_cost_per_1m: f64,
}Expand description
Model pricing configuration (per 1M tokens)
Fields§
§input_cost_per_1m: f64Cost per 1 million input tokens (USD)
output_cost_per_1m: f64Cost per 1 million output tokens (USD)
Implementations§
Source§impl ModelPricing
impl ModelPricing
Sourcepub fn default_pricing() -> Self
pub fn default_pricing() -> Self
Default pricing (conservative estimate)
Sourcepub fn gpt4_turbo() -> Self
pub fn gpt4_turbo() -> Self
GPT-4 Turbo pricing
Sourcepub fn gpt4o_mini() -> Self
pub fn gpt4o_mini() -> Self
GPT-4o mini pricing
Sourcepub fn claude3_opus() -> Self
pub fn claude3_opus() -> Self
Claude 3 Opus pricing
Sourcepub fn claude35_sonnet() -> Self
pub fn claude35_sonnet() -> Self
Claude 3.5 Sonnet pricing
Sourcepub fn claude3_haiku() -> Self
pub fn claude3_haiku() -> Self
Claude 3 Haiku pricing
Trait Implementations§
Source§impl Clone for ModelPricing
impl Clone for ModelPricing
Source§fn clone(&self) -> ModelPricing
fn clone(&self) -> ModelPricing
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 ModelPricing
impl Debug for ModelPricing
Source§impl<'de> Deserialize<'de> for ModelPricing
impl<'de> Deserialize<'de> for ModelPricing
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
Auto Trait Implementations§
impl Freeze for ModelPricing
impl RefUnwindSafe for ModelPricing
impl Send for ModelPricing
impl Sync for ModelPricing
impl Unpin for ModelPricing
impl UnsafeUnpin for ModelPricing
impl UnwindSafe for ModelPricing
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