pub struct AnalysisCost {
pub type: TypeTrue,
pub analysis_type: AnalysisTypeTrue,
pub model: Value,
pub prompt_tokens: f64,
pub completion_tokens: f64,
pub cost: f64,
}
Fields§
§type: TypeTrue
This is the type of cost, always ‘analysis’ for this class.
analysis_type: AnalysisTypeTrue
This is the type of analysis performed.
model: Value
This is the model that was used to perform the analysis.
prompt_tokens: f64
This is the number of prompt tokens used in the analysis.
completion_tokens: f64
This is the number of completion tokens generated in the analysis.
cost: f64
This is the cost of the component in USD.
Implementations§
Source§impl AnalysisCost
impl AnalysisCost
pub fn new( type: TypeTrue, analysis_type: AnalysisTypeTrue, model: Value, prompt_tokens: f64, completion_tokens: f64, cost: f64, ) -> AnalysisCost
Trait Implementations§
Source§impl Clone for AnalysisCost
impl Clone for AnalysisCost
Source§fn clone(&self) -> AnalysisCost
fn clone(&self) -> AnalysisCost
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AnalysisCost
impl Debug for AnalysisCost
Source§impl Default for AnalysisCost
impl Default for AnalysisCost
Source§fn default() -> AnalysisCost
fn default() -> AnalysisCost
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AnalysisCost
impl<'de> Deserialize<'de> for AnalysisCost
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
Source§impl PartialEq for AnalysisCost
impl PartialEq for AnalysisCost
Source§impl Serialize for AnalysisCost
impl Serialize for AnalysisCost
impl StructuralPartialEq for AnalysisCost
Auto Trait Implementations§
impl Freeze for AnalysisCost
impl RefUnwindSafe for AnalysisCost
impl Send for AnalysisCost
impl Sync for AnalysisCost
impl Unpin for AnalysisCost
impl UnwindSafe for AnalysisCost
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