Install StdLib CLI tools:
$ npm install lib.cli -g
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"
}
}
}
Create an StdLib account and modify the stdlib
object in package.json
to match your username. Then, deploy the development version:
$ lib up dev
Sign in to the Alexa Skills Kit and add a new skill named Cleverbot
with the following custom interaction model:
{
"intents": [
{
"intent": "SayIntent",
"slots": [
{
"name": "say",
"type": "SAY"
}
]
},
{
"intent": "AMAZON.StopIntent"
}
]
}
Create a custom slot type called SAY
with some random values:
what
who
where
when
why
how
SayIntent {say}
Point the HTTPS endpoint to your StdLib account's instance of alexa-cleverbot
(e.g. https://stdlib_username.stdlib.com/alexa-cleverbot@dev
).
Test skill locally
$ lib .
$ lib . SayIntent --say Hello