Chat Message Moderation Pipeline

Payload

FieldTypeRequiredDescription
pipelinestringYes"chat_moderation"
textstring, max 200 charsOne of text / message_idText to evaluate.
message_idUUIDOne of text / message_idA chat message 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_configobjectNo{category: threshold}, where each threshold is a number from 0 to 1. A category is flagged when its score is above its threshold.

Payload examples

{
  "pipeline": "chat_moderation",
  "text": "<text to test>",
  "async": false,
  "override_config": {
    "insult": 0.5,
    "threat": 0.3
  }
}
{
  "pipeline": "chat_moderation",
  "message_id": "3f6b2c1e-8a4d-4f7e-9b2a-1c5d7e9f0a12",
  "async": false,
  "override_config": {
    "insult": 0.5,
    "threat": 0.3
  }
}