Skip to main content

Get Text Toxicity

Get the Message Toxicity from HuggingFace Roberta model.

Args: msg (str): the message that we want to analyze. api_client (ApiClient, optional): authentication of the user of the request. Defaults to Depends(deps.get_trusted_api_client).

Returns: ToxicityClassification: the score of toxicity of the message.

Query Parameters
msg Msg REQUIRED
Responses
200

Successful Response

Schema OPTIONAL
undefined
422

Validation Error

Schema OPTIONAL
detail object[] OPTIONAL
loc undefined[]
msg Message
type Error Type