Skip to content

Commit 8b463ce

Browse files
authored
Update moderation.go (#29)
1 parent 53212c7 commit 8b463ce

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

moderation.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ type ModerationRequest struct {
1717
type Result struct {
1818
Categories ResultCategories `json:"categories"`
1919
CategoryScores ResultCategoryScores `json:"category_scores"`
20-
Flagged int `json:"flagged"`
20+
Flagged bool `json:"flagged"`
2121
}
2222

2323
// ResultCategories represents Categories of Result
2424
type ResultCategories struct {
25-
Hate int `json:"hate"`
26-
HateThreatening int `json:"hate/threatening"`
27-
SelfHarm int `json:"self-harm"`
28-
Sexual int `json:"sexual"`
29-
SexualMinors int `json:"sexual/minors"`
30-
Violence int `json:"violence"`
31-
ViolenceGraphic int `json:"violence/graphic"`
25+
Hate bool `json:"hate"`
26+
HateThreatening bool `json:"hate/threatening"`
27+
SelfHarm bool `json:"self-harm"`
28+
Sexual bool `json:"sexual"`
29+
SexualMinors bool `json:"sexual/minors"`
30+
Violence bool `json:"violence"`
31+
ViolenceGraphic bool `json:"violence/graphic"`
3232
}
3333

3434
// ResultCategoryScores represents CategoryScores of Result

0 commit comments

Comments
 (0)