CountTextTokensResponse.fromJson constructor
CountTextTokensResponse.fromJson(
- Object? j
Implementation
factory CountTextTokensResponse.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return CountTextTokensResponse(
tokenCount: switch (json['tokenCount']) {
null => 0,
Object $1 => decodeInt($1),
},
);
}