toJson method

  1. @override
Object toJson()

Implementation

@override
Object toJson() => {
  if (tuningDatasetExampleCount.isNotDefault)
    'tuningDatasetExampleCount': tuningDatasetExampleCount.toString(),
  if (totalTuningCharacterCount.isNotDefault)
    'totalTuningCharacterCount': totalTuningCharacterCount.toString(),
  if (totalBillableCharacterCount.isNotDefault)
    'totalBillableCharacterCount': totalBillableCharacterCount.toString(),
  if (totalBillableTokenCount.isNotDefault)
    'totalBillableTokenCount': totalBillableTokenCount.toString(),
  if (tuningStepCount.isNotDefault)
    'tuningStepCount': tuningStepCount.toString(),
  'userInputTokenDistribution': ?userInputTokenDistribution?.toJson(),
  'userOutputTokenDistribution': ?userOutputTokenDistribution?.toJson(),
  'userMessagePerExampleDistribution': ?userMessagePerExampleDistribution
      ?.toJson(),
  if (userDatasetExamples.isNotDefault)
    'userDatasetExamples': [for (final i in userDatasetExamples) i.toJson()],
  if (totalTruncatedExampleCount.isNotDefault)
    'totalTruncatedExampleCount': totalTruncatedExampleCount.toString(),
  if (truncatedExampleIndices.isNotDefault)
    'truncatedExampleIndices': [
      for (final i in truncatedExampleIndices) i.toString(),
    ],
  if (droppedExampleReasons.isNotDefault)
    'droppedExampleReasons': droppedExampleReasons,
};