pub struct GenerationResult {
pub text: String,
pub tokens_generated: u32,
pub prompt_tokens: u32,
pub tokens_per_sec: f64,
pub time_to_first_token_ms: f64,
pub generation_time_ms: f64,
}Expand description
Result of a completed generation.
Fields§
§text: StringThe full generated text.
tokens_generated: u32Number of tokens generated in the response.
prompt_tokens: u32Number of tokens in the (formatted) prompt that was fed in.
tokens_per_sec: f64Average generation speed in tokens per second.
time_to_first_token_ms: f64Time from request start to the first emitted token, in milliseconds.
generation_time_ms: f64Total generation time, in milliseconds.
Trait Implementations§
Source§impl Clone for GenerationResult
impl Clone for GenerationResult
Source§fn clone(&self) -> GenerationResult
fn clone(&self) -> GenerationResult
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 moreAuto Trait Implementations§
impl Freeze for GenerationResult
impl RefUnwindSafe for GenerationResult
impl Send for GenerationResult
impl Sync for GenerationResult
impl Unpin for GenerationResult
impl UnsafeUnpin for GenerationResult
impl UnwindSafe for GenerationResult
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