Skip to main content

TokenCallback

Type Alias TokenCallback 

Source
pub type TokenCallback = Box<dyn FnMut(&str, u32, f64) + Send>;
Expand description

Token callback invoked for each generated token. Receives the token text, tokens generated so far, and current tokens/sec.

Aliased Typeยง

pub struct TokenCallback(/* private fields */);