clever-bot-api

1.5.4 • Public • Published

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)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.5.43latest

Version History

VersionDownloads (Last 7 Days)Published
1.5.43
1.5.30
1.5.20
1.5.10
1.5.00
1.4.20
1.4.10
1.4.00
1.3.00
1.2.40
1.2.20
1.2.10
1.2.00
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.10
1.0.00

Package Sidebar

Install

npm i clever-bot-api

Weekly Downloads

3

Version

1.5.4

License

MIT

Unpacked Size

2.87 kB

Total Files

3

Last publish

Collaborators

  • blobkat