usagefromJson static method

GroqUsage usagefromJson(
  1. Map<String, dynamic> json
)

Implementation

static GroqUsage usagefromJson(Map<String, dynamic> json) {
  return GroqUsage(
    promptTokens: json['promptTokens'] as int,
    completionTokens: json['completionTokens'] as int,
    promptTime: Duration(milliseconds: json['promptTime'] as int),
    completionTime: Duration(milliseconds: json['completionTime'] as int),
  );
}