/alexa-cleverbot

Cleverbot integration with Alexa

Primary LanguageJavaScriptMIT LicenseMIT

alexa-cleverbot

Getting started

Install StdLib CLI tools:

$ npm install lib.cli -g

Setup environment

Create a file named env.json and copy in your cleverbot.io API credentials:

{
  "dev": {
    "cleverbot": {
      "user": "CLEVERBOT_API_USER",
      "key": "CLEVERBOT_API_KEY",
      "nick": "SESSION_NICKNAME"
    }
  },
  "release": {
    "cleverbot": {
      "user": "CLEVERBOT_API_USER",
      "key": "CLEVERBOT_API_KEY",
      "nick": "SESSION_NICKNAME"
    }
  }
}

Deploy skill

Create an StdLib account and modify the stdlib object in package.json to match your username. Then, deploy the development version:

$ lib up dev

Create skill

Sign in to the Alexa Skills Kit and add a new skill named Cleverbot with the following custom interaction model:

Intent schema

{
  "intents": [
    {
      "intent": "SayIntent",
      "slots": [
        {
          "name": "say",
          "type": "SAY"
        }
      ]
    },
    {
      "intent": "AMAZON.StopIntent"
    }
  ]
}

Custom slot types

Create a custom slot type called SAY with some random values:

what
who
where
when
why
how

Sample utterances

SayIntent {say}

Configuration

Point the HTTPS endpoint to your StdLib account's instance of alexa-cleverbot (e.g. https://stdlib_username.stdlib.com/alexa-cleverbot@dev).

Testing the skill

Test skill locally

$ lib .
$ lib . SayIntent --say Hello