LanguageModelUsage constructor

const LanguageModelUsage({
  1. int? promptTokens,
  2. int? promptBillableCharacters,
  3. int? responseTokens,
  4. int? responseBillableCharacters,
  5. int? totalTokens,
})

Usage stats for the generation.

You can use this information to determine how much the model call costed (as usage is usually priced by token).

This is only available for some models.

Implementation

const LanguageModelUsage({
  this.promptTokens,
  this.promptBillableCharacters,
  this.responseTokens,
  this.responseBillableCharacters,
  this.totalTokens,
});