Comment Quality Pipeline
Payload
| Field | Type | Required | Description |
|---|---|---|---|
pipeline | string | Yes | "comment_quality" |
text | string, max 5000 chars | One of text / comment_id | Text to evaluate. |
comment_id | UUID | One of text / comment_id | A comment in this application. Its text is evaluated. |
async | boolean | No (default true) | true returns at once with a url to poll. false waits up to about 25 seconds for the result. |
override_config | object | No | Any of the rule fields below. |
override_config.min_char_count | integer ≥ 0 | Minimum number of characters, not counting whitespace. 0 turns it off. | |
override_config.disallowed_chars | string, max 64 chars | Fails if the text contains any of these characters. | |
override_config.emoji_ratio_threshold | number 0–1 or null | Maximum share of the text that can be emoji (inclusive). null turns it off. | |
override_config.exclude_gif | boolean | Fails comments that contain a GIF. | |
override_config.min_sentiment_score | number −1 to 1 or null | Minimum sentiment (−1 negative, 0 neutral, 1 positive). null turns it off. | |
override_config.max_toxicity_score | number 0–1 or null | Maximum toxicity. null turns it off. |
Payload Examples
{
"pipeline": "comment_quality",
"text": "gg 🔥🔥🔥",
"async": false,
"override_config": {
"min_char_count": 3,
"emoji_ratio_threshold": 0.5,
"max_toxicity_score": null
}
}{
"pipeline": "comment_quality",
"comment_id": "8be4df61-93ca-11d2-aa0d-00e098032b8c",
"async": false,
"override_config": {
"min_char_count": 3,
"emoji_ratio_threshold": 0.5,
"max_toxicity_score": null
}
}If your application has no saved quality rules, the defaults are used. A reply's comment_id always fails min_char_count with the value "reply", because only top-level comments can be quality comments.
Response
Updated about 6 hours ago

