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 prompt_ms: Option<i64>,
pub eval_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>§prompt_ms: Option<i64>Milliseconds the backend spent on the prompt.
eval_ms: Option<i64>Milliseconds the backend spent generating, the prompt excluded.
finish_reason: Option<String>§token_counts_estimated: boolTrait Implementations§
Source§impl Clone for GenerationStats
impl Clone for GenerationStats
Source§impl Debug for GenerationStats
impl Debug for GenerationStats
Source§impl Default for GenerationStats
impl Default 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
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