LogprobsResult_Candidate.fromJson constructor

LogprobsResult_Candidate.fromJson(
  1. Object? j
)

Implementation

factory LogprobsResult_Candidate.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return LogprobsResult_Candidate(
    token: switch (json['token']) {
      null => null,
      Object $1 => decodeString($1),
    },
    tokenId: switch (json['tokenId']) {
      null => null,
      Object $1 => decodeInt($1),
    },
    logProbability: switch (json['logProbability']) {
      null => null,
      Object $1 => decodeDouble($1),
    },
  );
}