Comment Quality Pipeline

Payload

FieldTypeRequiredDescription
pipelinestringYes"comment_quality"
textstring, max 5000 charsOne of text / comment_idText to evaluate.
comment_idUUIDOne of text / comment_idA comment in this application. Its text is evaluated.
asyncbooleanNo (default true)true returns at once with a url to poll. false waits up to about 25 seconds for the result.
override_configobjectNoAny of the rule fields below.
override_config.min_char_countinteger ≥ 0Minimum number of characters, not counting whitespace. 0 turns it off.
override_config.disallowed_charsstring, max 64 charsFails if the text contains any of these characters.
override_config.emoji_ratio_thresholdnumber 0–1 or nullMaximum share of the text that can be emoji (inclusive). null turns it off.
override_config.exclude_gifbooleanFails comments that contain a GIF.
override_config.min_sentiment_scorenumber −1 to 1 or nullMinimum sentiment (−1 negative, 0 neutral, 1 positive). null turns it off.
override_config.max_toxicity_scorenumber 0–1 or nullMaximum 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