From 8b463ceb2b74ee9003864834ce51a21de98457d0 Mon Sep 17 00:00:00 2001 From: nya~ Date: Wed, 3 Aug 2022 12:41:36 +0700 Subject: [PATCH] Update moderation.go (#29) --- moderation.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/moderation.go b/moderation.go index e4e7380..efc76cc 100644 --- a/moderation.go +++ b/moderation.go @@ -17,18 +17,18 @@ type ModerationRequest struct { type Result struct { Categories ResultCategories `json:"categories"` CategoryScores ResultCategoryScores `json:"category_scores"` - Flagged int `json:"flagged"` + Flagged bool `json:"flagged"` } // ResultCategories represents Categories of Result type ResultCategories struct { - Hate int `json:"hate"` - HateThreatening int `json:"hate/threatening"` - SelfHarm int `json:"self-harm"` - Sexual int `json:"sexual"` - SexualMinors int `json:"sexual/minors"` - Violence int `json:"violence"` - ViolenceGraphic int `json:"violence/graphic"` + Hate bool `json:"hate"` + HateThreatening bool `json:"hate/threatening"` + SelfHarm bool `json:"self-harm"` + Sexual bool `json:"sexual"` + SexualMinors bool `json:"sexual/minors"` + Violence bool `json:"violence"` + ViolenceGraphic bool `json:"violence/graphic"` } // ResultCategoryScores represents CategoryScores of Result