Moderation constructor
const
Moderation({
- required bool flagged,
- required ModerationCategories categories,
- @JsonKey.new(name: 'category_scores') required ModerationCategoriesScores categoryScores,
- @JsonKey.new(name: 'category_applied_input_types') required ModerationCategoriesAppliedInputTypes categoryAppliedInputTypes,
Factory constructor for Moderation
Implementation
const factory Moderation({
/// Whether any of the below categories are flagged.
required bool flagged,
/// A list of the categories, and whether they are flagged or not.
required ModerationCategories categories,
/// A list of the categories along with their scores as predicted by model.
@JsonKey(name: 'category_scores')
required ModerationCategoriesScores categoryScores,
/// A list of the categories along with the input type(s) that the score applies to.
@JsonKey(name: 'category_applied_input_types')
required ModerationCategoriesAppliedInputTypes categoryAppliedInputTypes,
}) = _Moderation;