SupervisedTuningDatasetDistribution_DatasetBucket.fromJson constructor

SupervisedTuningDatasetDistribution_DatasetBucket.fromJson(
  1. Object? j
)

Implementation

factory SupervisedTuningDatasetDistribution_DatasetBucket.fromJson(
  Object? j,
) {
  final json = j as Map<String, Object?>;
  return SupervisedTuningDatasetDistribution_DatasetBucket(
    count: switch (json['count']) {
      null => 0,
      Object $1 => decodeDouble($1),
    },
    left: switch (json['left']) {
      null => 0,
      Object $1 => decodeDouble($1),
    },
    right: switch (json['right']) {
      null => 0,
      Object $1 => decodeDouble($1),
    },
  );
}