pub struct GenerationStats {
pub prompt_tokens: Option<i64>,
pub completion_tokens: Option<i64>,
pub duration_ms: Option<i64>,
pub ttft_ms: Option<i64>,
pub load_ms: Option<i64>,
pub finish_reason: Option<String>,
pub token_counts_estimated: bool,
}Expand description
Metrics reported when a generation finishes. Every field is optional — a runtime fills in what it can measure.
Fields§
§prompt_tokens: Option<i64>§completion_tokens: Option<i64>§duration_ms: Option<i64>§ttft_ms: Option<i64>§load_ms: Option<i64>§finish_reason: Option<String>§token_counts_estimated: boolTrait 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 (const: unstable) · 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 Default for GenerationStats
impl Default for GenerationStats
Source§fn default() -> GenerationStats
fn default() -> GenerationStats
Returns the “default value” for a type. Read more
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
impl Eq for GenerationStats
Source§impl Hash for GenerationStats
impl Hash for GenerationStats
Source§impl PartialEq for GenerationStats
impl PartialEq for GenerationStats
Source§impl Serialize for GenerationStats
impl Serialize for GenerationStats
impl StructuralPartialEq for GenerationStats
Auto Trait Implementations§
impl Freeze for GenerationStats
impl RefUnwindSafe for GenerationStats
impl Send for GenerationStats
impl Sync for GenerationStats
impl Unpin for GenerationStats
impl UnsafeUnpin 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