pub struct ModelCost {
pub input: f64,
pub output: f64,
pub cache_read: Option<f64>,
pub cache_write: Option<f64>,
}Expand description
Per-million-token pricing for a model.
Fields§
§input: f64Price per million input (prompt) tokens in USD.
output: f64Price per million output (completion) tokens in USD.
cache_read: Option<f64>Price per million cache-read tokens, if the provider supports prompt caching.
cache_write: Option<f64>Price per million cache-write tokens, if the provider supports prompt caching.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelCost
impl<'de> Deserialize<'de> for ModelCost
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 ModelCost
impl RefUnwindSafe for ModelCost
impl Send for ModelCost
impl Sync for ModelCost
impl Unpin for ModelCost
impl UnsafeUnpin for ModelCost
impl UnwindSafe for ModelCost
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