pub struct Rate {
pub input: Option<f64>,
pub output: Option<f64>,
pub cache_write: Option<f64>,
pub cache_read: Option<f64>,
pub input_200k: Option<f64>,
pub output_200k: Option<f64>,
pub cache_write_200k: Option<f64>,
pub cache_read_200k: Option<f64>,
}Expand description
One model’s per-token rates. None = the category isn’t billed / has no
tier (e.g. OpenAI models have no cache-write cw; flat models have no
*_200k). Mirrors the Python short-rate dict keys exactly.
Fields§
§input: Option<f64>§output: Option<f64>§cache_write: Option<f64>§cache_read: Option<f64>§input_200k: Option<f64>§output_200k: Option<f64>§cache_write_200k: Option<f64>§cache_read_200k: Option<f64>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rate
impl<'de> Deserialize<'de> for Rate
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
impl Copy for Rate
impl StructuralPartialEq for Rate
Auto Trait Implementations§
impl Freeze for Rate
impl RefUnwindSafe for Rate
impl Send for Rate
impl Sync for Rate
impl Unpin for Rate
impl UnsafeUnpin for Rate
impl UnwindSafe for Rate
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