Skip to content

Changes moderation category scores from float32 to float64 #1018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions moderation.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ type ResultCategories struct {

// ResultCategoryScores represents CategoryScores of Result.
type ResultCategoryScores struct {
Hate float32 `json:"hate"`
HateThreatening float32 `json:"hate/threatening"`
Harassment float32 `json:"harassment"`
HarassmentThreatening float32 `json:"harassment/threatening"`
SelfHarm float32 `json:"self-harm"`
SelfHarmIntent float32 `json:"self-harm/intent"`
SelfHarmInstructions float32 `json:"self-harm/instructions"`
Sexual float32 `json:"sexual"`
SexualMinors float32 `json:"sexual/minors"`
Violence float32 `json:"violence"`
ViolenceGraphic float32 `json:"violence/graphic"`
Hate float64 `json:"hate"`
HateThreatening float64 `json:"hate/threatening"`
Harassment float64 `json:"harassment"`
HarassmentThreatening float64 `json:"harassment/threatening"`
SelfHarm float64 `json:"self-harm"`
SelfHarmIntent float64 `json:"self-harm/intent"`
SelfHarmInstructions float64 `json:"self-harm/instructions"`
Sexual float64 `json:"sexual"`
SexualMinors float64 `json:"sexual/minors"`
Violence float64 `json:"violence"`
ViolenceGraphic float64 `json:"violence/graphic"`
}

// ModerationResponse represents a response structure for moderation API.
Expand Down
Loading