npm install simply-api.js@legacy
(or)
yarn add simply-api.js@legacy
(or)
pnpm add simply-api.js
Endpoint | Description |
---|---|
chatbot(msg, {options}) | Chat with Chat Bot |
tictactoe(uid, ai, board) | AI Game of Tic-Tac-Toe |
toxicity(text) | Detect Toxic messages |
const {chatbot} = require("simply-api");
let data = await chatbot("Test Run by Simply-API.js", {uid: 69});
console.log(data) // returns JSON result
const {tictactoe} = require("simply-api");
const uid = 123, ai = "o";
const board = [
" ", " ", " ",
" ", "x", " ",
" ", " ", " "
];
let data = await tictactoe(uid, ai, board);
console.log(data) // returns JSON result
const {toxicity} = require("simply-api");
const text = " *Insert offensive text here* ";
let data = await toxicity(text);
console.log(data) // returns JSON result
const text = " *Insert offensive text here* ";
var simplyapi = require("simply-api");
const uid = 123, ai = "o";
const board = [
" ", " ", " ",
" ", "x", " ",
" ", " ", " "
];
simplyapi.chatbot("Hello!").then(data => {
console.log(data) // returns JSON result
}); // Chat Bot AI
simplyapi.tictactoe(uid, ai, board).then(data => {
console.log() // Returns Array Result
});
simplyapi.toxicity(text).then(data => {
console.log(data) // returns JSON result
}); // Toxicity Detection