pub struct GenerationStats {
pub id: String,
pub total_cost: Option<f64>,
pub tokens_prompt: Option<usize>,
pub tokens_completion: Option<usize>,
pub native_tokens_prompt: Option<usize>,
pub native_tokens_completion: Option<usize>,
}Expand description
Generation statistics (returned by /api/v1/generation).
Fields§
§id: StringGeneration ID.
total_cost: Option<f64>Total cost in USD.
tokens_prompt: Option<usize>Tokens used.
tokens_completion: Option<usize>Tokens generated.
native_tokens_prompt: Option<usize>Native tokens used.
native_tokens_completion: Option<usize>Native tokens generated.
Trait Implementations§
Source§impl Clone for GenerationStats
impl Clone for GenerationStats
Source§fn clone(&self) -> GenerationStats
fn clone(&self) -> GenerationStats
Returns a duplicate 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 GenerationStats
impl Debug for GenerationStats
Source§impl<'de> Deserialize<'de> for GenerationStats
impl<'de> Deserialize<'de> for GenerationStats
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 GenerationStats
impl RefUnwindSafe for GenerationStats
impl Send for GenerationStats
impl Sync for GenerationStats
impl Unpin for GenerationStats
impl UnwindSafe for GenerationStats
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