clever-bot-api
v1.5.4
Published
Better AI!
Readme
Basic Usage
const ai = require("clever-bot-api")
ai("Hello, there").then( res => console.log(res) )Context
function log(a){ console.log(a) }
// You can pass a context (message history) for more meaningful results
const history = ["Hi", "Are you ok?"]
ai("Yes i'm fine", history).then(log)
//Alternatively, you can pass a channel ID to automatically manage history
const channel = "chat-1", channel2 = "chat-2";
ai("Hi", channel).then(log)
ai("Yes i'm fine", channel).then(log) //takes context from channel1 (2 messages)
ai("Hello!", channel2) //takes context from channel2 (no messages)