Struct relay_event_normalization::ModelCosts
source · pub struct ModelCosts {
pub version: u16,
pub costs: Vec<ModelCost>,
}
Expand description
A mapping of AI model types (like GPT-4) to their respective costs.
Fields§
§version: u16
The version of the model cost struct
costs: Vec<ModelCost>
The mappings of model ID => cost
Implementations§
source§impl ModelCosts
impl ModelCosts
sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
false
if measurement and metrics extraction should be skipped.
Trait Implementations§
source§impl Clone for ModelCosts
impl Clone for ModelCosts
source§fn clone(&self) -> ModelCosts
fn clone(&self) -> ModelCosts
Returns a copy 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 ModelCosts
impl Debug for ModelCosts
source§impl Default for ModelCosts
impl Default for ModelCosts
source§fn default() -> ModelCosts
fn default() -> ModelCosts
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ModelCosts
impl<'de> Deserialize<'de> for ModelCosts
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 ModelCosts
impl RefUnwindSafe for ModelCosts
impl Send for ModelCosts
impl Sync for ModelCosts
impl Unpin for ModelCosts
impl UnwindSafe for ModelCosts
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)