Skip to content

Commit

Permalink
Update moderation.go (sashabaranov#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
galpt authored Aug 3, 2022
1 parent 53212c7 commit 8b463ce
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions moderation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b463ce

Please sign in to comment.