-
Notifications
You must be signed in to change notification settings - Fork 1
Message API
The message API is there to analyze messages or text for badwords. As soon as the API receives a request on this endpoint, the server runs through the text using a levensthein to recognize badwords and words that are similar to them.
To make an API request, you must use this endpoint: /chatfilter
A json must be attached there that looks like this:
{
"key": "Your API key",
"message": "TEXT"
}
You will then receive a JSON in response. If the server finds NONE questionable words, an empty json is returned: {}
If a relevant word is recognized, the following JSON is returned:
{
"input_word": "STR",
"matched_badword": "STR",
"distance": 0,
}
input_word
= The word that triggered the chat filter
matched_badword
= The word in the badword list that matches the input word.
distance
= The distance between the word entered and the word in the list. (0 = direct match) (INT)#
import requests
json = {"key": "Your API key", "message": "HI, my name is Red. This is a test."}
response = requests.get("http://solyra.avocloud.net:1652/chatfilter", json=json)
data = response.json()
print(data)
Response:
{}
AvoCloud.net - Red_wolf2467