Skip to content
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

feat(moderations): add harassment and self-hard categories and scores #230

Merged
merged 1 commit into from
Aug 23, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,28 @@ public class Categories(
* Violent content that depicts death, violence, or serious physical injury in extreme graphic detail.
*/
@SerialName("violence/graphic") public val violenceGraphic: Boolean,

/**
* Content that expresses, incites, or promotes harassing language towards any target.
*/
@SerialName("harassment") public val harassment: Boolean,

/**
* Harassment content that also includes violence or serious harm towards any target.
*/
@SerialName("harassment/threatening") public val harassmentThreatening: Boolean,

/**
* Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as
* suicide, cutting, and eating disorders.
*/
@SerialName("self-harm/intent") public val selfHarmIntent: Boolean,

/**
* Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that
* gives instructions or advice on how to commit such acts.
*/
@SerialName("self-harm/instructions") public val selfHarmInstructions: Boolean,
)

@Serializable
Expand Down Expand Up @@ -123,4 +145,24 @@ public class CategoryScores(
* Violent content that depicts death, violence, or serious physical injury in extreme graphic detail.
*/
@SerialName("violence/graphic") public val violenceGraphic: Double,

/**
* The score for the category 'harassment'.
*/
@SerialName("harassment") public val harassment: Double,

/**
* The score for the category 'harassment/threatening'.
*/
@SerialName("harassment/threatening") public val harassmentThreatening: Double,

/**
* The score for the category 'self-harm/intent'.
*/
@SerialName("self-harm/intent") public val selfHarmIntent: Double,

/**
* The score for the category 'self-harm/instructions'.
*/
@SerialName("self-harm/instructions") public val selfHarmInstructions: Double,
)