Steps to build Alexa Chatbot from scratch
- Sign up for an Amazon developer account, if you don’t have one
2. Click on Amazon Alexa highlighted below.
3. Upon clicking Amazon Alexa, you will land on below page
4. Click on Create Alexa Skills
5. You will land to below-shown page. Click on Start a Skill
You will land on the below-mentioned page. Another way is escaping the last step, you can reach tho this step by click on this URL Alexa console
7. Since I have a new Amazon account, I have to Create Skill for the Alexa as highlighted below
. I am dividing this step into four sub-steps to make it simpler.
i> Create a new skill
Give a name to the skill, I have named mine Test_Skill
ii> Choose a model to add to your skill
There are many ways to start building a skill. You can design your own custom model or start with a pre-built model. Pre-built models are interaction models that contain a package of intents and utterances that you can add to your skill.
iii> Choose a method to host your skill's backend resources
I am going with default method “Provision your own”
iv> Scroll to the top and click on Create skill
9. Choose a template
Select a quick start template to get started with a predefined skill or simply "Start from scratch" and click on Choose.
10. This way you reach to the Alexa developer console dashboard
11. Click on Invocation
By default, it will take the skill name as Skill Invocation name. I have changed that to father of deep learning. Then click on Save Model
12. Click on the Endpoint
Now, we need to provide the endpoint to Alexa console but first we need to setup an endpoint.
13. Creating a node server
Create a server which can accept POST requests on default location i.e. “/”.
There are so many techniques for creating a server, I personally prefer node
I assume that you’ve node, npm and Visual studio code already installed
For the specific requirements of this tutorial, we will create a Hello World node app following the steps below:
● Run npm init on a terminal and when asked for the package name Alexa
● Follow the terminal wizard
● Run cd Alexa
● In the package.jsonfile
● Run npm i express http -save and this will add the following entry in the package.json file:
● Set value to index.js of the main key in the package.json file
● Add a file index.js on the same level
● àdd the following code to the index.js file:
● Set value of scripts to { “start”: “node index.js” }
● Run npm start on the terminal
● If everything is fine, you must see the following prompt:
Copy the SSL enabled forwarded link, in the above screen https://6d0d6e60.ngrok.io is the SSL link and provide the link in the Enter URL link
Select HTTPS, and under SSL certificate type drop down select the 2nd option:
My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority
Click Save Endpoints
Click on JSON editor and provide the following model:
Click on Save Model and click on Build Model
Save and build the model
Once, the skill model is built - we need to test it. Click on the Test tab and toggle ON the “Test is enabled for this skill”.
Testing Alexa skill
That’s it, you’ve created an Alexa bot connected to your locally running node project.
References: https://developer.amazon.com
Building ElintData AI high performance Datacenter Deep Tech Crypto Quantum Cyber Security AI safety platforms and NLP genAI RAG LORA SFT PEFT RLHF ML/AI Data Products Visiting Prof. and Industry Expert at IIT IIM SPJIMR
5 年Ravi Kumar