βοΈchecToxicityTest
Last updated
// import the ai-core-sdk
import {AIServices} from '@nest25/ai-core-sdk';
// create a new instance of the sdk
const aiServices = new AIServices();
async function main() {
// get the result of the test
const result = await aiServices.checkToxicityText('this is a prompt');
console.log(result);
}
main();{
"message": "Request successful",
"response": {
"identity_hate": true,
"insult": false,
"obscene": false,
"severe_toxic": false,
"threat": false,
"toxic": true
},
"status": 1
}