Quick Start



To install this package, simply enter the following in your console

npm install --save cleverbot.io

Note: It is a good practice to include --save to add this to your dependencies in your package.json

Before using this module, please get your API keys at http://cleverbot.io/keys

To initialize cleverbot, require the module, then create a new instance of cleverbot

var cleverbot = require("cleverbot.io"),
bot = new cleverbot("YOUR_API_USER", "YOUR_API_KEY");

cleverbot.io allows you to save cleverbot sessions to access later
If you've already created a session previously, simply add the following code to reference it

bot.setNick("sessionname")

To create or access a cleverbot session, start with the following

bot.create(function (err, session) {
  // session is your session name, it will either be as you set it previously, or cleverbot.io will generate one for you

  // Woo, you initialized cleverbot.io.  Insert further code here
});

Now querying cleverbot is simple, you pass the text to the .ask() method

bot.ask("Just a small town girl", function (err, response) {
  console.log(response); // Will likely be: "Living in a lonely world"
});

Well, that's it for now! Happy hacking!


To use this package, simply download it, place cleverbot.io.min.js in the web directory add the following to your page

<script src="cleverbot.io.min.js"></script>

or you can use the Cleverbot.io CDN

<script src="//cdn.cleverbot.io/build/1.0/cleverbot.io.min.js"></script>

Before using this module, please get your API keys at https://cleverbot.io/keys

To initialize cleverbot, create a new instance of cleverbot

var bot = new cleverbot("YOUR_API_USER", "YOUR_API_KEY");

cleverbot.io allows you to save cleverbot sessions to access later
If you've already created a session previously, simply add the following code to reference it

bot.setNick("sessionname")

To create or access a cleverbot session, start with the following

bot.create(function (err, session) {
  // session is your session name, it will either be as you set it previously, or cleverbot.io will generate one for you

  // Woo, you initialized cleverbot.io.  Insert further code here
});

Now querying cleverbot is simple, you pass the text to the .ask() method

bot.ask("Just a small town girl", function (err, response) {
  console.log(response); // Will likely be: "Living in a lonely world"
});

Well, that's it for now! Happy hacking!


To install this Gem, use either RubyGems or Bundler. If using RubyGems, enter the following in the console:

$ gem install cleverbot_io

Otherwise, if using Bundler, add the following to the application's Gemfile:

gem('cleverbot_io')

And then enter the following in the console:

$ bundle install

Before using this module, please get your API keys at http://cleverbot.io/keys

To initialize cleverbot, require the module, then create a new instance

require 'cleverbot'
bot = Cleverbot.new('YOUR_API_USER', 'YOUR_API_KEY')

cleverbot.io allows you to save Cleverbot sessions to access later, which can be achieved in the initialization of the module.

require 'cleverbot'
bot = Cleverbot.new('YOUR_API_USER', 'YOUR_API_KEY', 'sessionname')

Now querying cleverbot is simple, you pass the text to the Cleverbot#say

bot.say('Why am I still talking to you?')
# => 'Because you have a beautiful soul.'

Well, that's it for now! Happy hacking!