ModerationResult
Result of a content moderation check
Operations
GetCategories
method : public : GetCategories() ~ JsonElementReturn
| Type | Description |
|---|---|
| JsonElement | the raw categories JSON element |
GetCategory
Check whether a specific category was flagged
method : public : GetCategory(name:String) ~ BoolParameters
| Name | Type | Description |
|---|---|---|
| name | String | category name (e.g. 'hate', 'violence', 'sexual') |
Return
| Type | Description |
|---|---|
| Bool | true if flagged |
GetScore
Get the confidence score for a specific category
method : public : GetScore(name:String) ~ FloatParameters
| Name | Type | Description |
|---|---|---|
| name | String | category name |
Return
| Type | Description |
|---|---|
| Float | score in [0.0, 1.0] |
GetScores
method : public : GetScores() ~ JsonElementReturn
| Type | Description |
|---|---|
| JsonElement | the raw category_scores JSON element |
IsFlagged
method : public : IsFlagged() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | true if any category was flagged |