pub struct Pricing {
pub input_per_mtok: f64,
pub output_per_mtok: f64,
}Expand description
Per-model token pricing in USD per million tokens.
Fields§
§input_per_mtok: f64§output_per_mtok: f64Implementations§
Source§impl Pricing
impl Pricing
Sourcepub fn cache_read_per_mtok(&self) -> f64
pub fn cache_read_per_mtok(&self) -> f64
Cache reads are billed at 10% of the input rate.
Sourcepub fn cache_write_per_mtok(&self) -> f64
pub fn cache_write_per_mtok(&self) -> f64
Cache writes are billed at 125% of the input rate.
Trait Implementations§
impl Copy for Pricing
impl StructuralPartialEq for Pricing
Auto Trait Implementations§
impl Freeze for Pricing
impl RefUnwindSafe for Pricing
impl Send for Pricing
impl Sync for Pricing
impl Unpin for Pricing
impl UnsafeUnpin for Pricing
impl UnwindSafe for Pricing
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