QuestionAnsweringHelpfulnessInstance.fromJson constructor
QuestionAnsweringHelpfulnessInstance.fromJson(
- Object? j
Implementation
factory QuestionAnsweringHelpfulnessInstance.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return QuestionAnsweringHelpfulnessInstance(
prediction: switch (json['prediction']) {
null => null,
Object $1 => decodeString($1),
},
reference: switch (json['reference']) {
null => null,
Object $1 => decodeString($1),
},
context: switch (json['context']) {
null => null,
Object $1 => decodeString($1),
},
instruction: switch (json['instruction']) {
null => null,
Object $1 => decodeString($1),
},
);
}