toJson method
Implementation
@override
Object toJson() => {
if (promptTokenCount.isNotDefault) 'promptTokenCount': promptTokenCount,
if (candidatesTokenCount.isNotDefault)
'candidatesTokenCount': candidatesTokenCount,
if (thoughtsTokenCount.isNotDefault)
'thoughtsTokenCount': thoughtsTokenCount,
if (totalTokenCount.isNotDefault) 'totalTokenCount': totalTokenCount,
if (cachedContentTokenCount.isNotDefault)
'cachedContentTokenCount': cachedContentTokenCount,
if (promptTokensDetails.isNotDefault)
'promptTokensDetails': [for (final i in promptTokensDetails) i.toJson()],
if (cacheTokensDetails.isNotDefault)
'cacheTokensDetails': [for (final i in cacheTokensDetails) i.toJson()],
if (candidatesTokensDetails.isNotDefault)
'candidatesTokensDetails': [
for (final i in candidatesTokensDetails) i.toJson(),
],
};