pub trait GetTokenUsage {
// Required method
fn token_usage(&self) -> Option<Usage>;
}
Expand description
A trait for grabbing the token usage of a completion response.
Primarily designed for streamed completion responses in streamed multi-turn, as otherwise it would be impossible to do.