cleverbot.js

A Node.js Cleverbot API wrapper library. Go make a chat bot in a flash!


Keywords
cleverbot, api, node, chat, bot, chatbot, clever, javascript, js, nodejs
License
GPL-3.0
Install
npm install cleverbot.js@2.0.0

Documentation

cleverbot.js

A Node.js Cleverbot API wrapper library. Go make a chat bot in a flash!

GitHub release Dependencies Known Vulnerabilities license Say Thanks!

Table of Contents

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. I recommend installing the latest LTS version of Node.js.

Installation is done using the npm install command:

$ npm install cleverbot.js --save

Usage

Constructor

new Cleverbot();
Parameter Type Optional Default Description
options Object - The options for initializing cleverbot.js
options.APIKey String - The API key that you got from the cleverbot website
options.preserveState Boolean false Whether to preserve the state of the conversations.

Example

const Cleverbot = require('cleverbot.js');
let options = {
  APIKey: 'CFDoi4234falFOFaSfwepxXhBRW',
  preserveState: true
};
cleverbot = new Cleverbot(options);

cleverbot.write('Hi how\'re you?').then(response => {
  console.log(response.output); // Fine, How're you?
}).catch(e => {
  console.error(e);
});

Contributors

List of all contributors

License

GPL-3.0

If you liked this project you can ⭐ Star it on GitHub to show your love and/or send a thank you note.