pub struct Pricing {
pub input_per_mtok: f64,
pub output_per_mtok: f64,
pub cache_write_multiplier: f64,
pub cache_read_multiplier: f64,
}Expand description
Per-million-token prices. Configured, never guessed — hardcoding a price table guarantees it is wrong within a quarter.
Fields§
§input_per_mtok: f64§output_per_mtok: f64§cache_write_multiplier: f64Cache writes usually cost more than plain input.
cache_read_multiplier: f64Cache reads usually cost far less.
Trait Implementations§
impl Copy for Pricing
Source§impl<'de> Deserialize<'de> for Pricing
impl<'de> Deserialize<'de> for Pricing
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 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