Hands-On Chatbots and Conversational UI Development
Srini Janarthanam, Phil D Hall, Vamsi Venigalla
- 392 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Hands-On Chatbots and Conversational UI Development
Srini Janarthanam, Phil D Hall, Vamsi Venigalla
About This Book
Build over 8 chatbots and conversational user interfaces with leading tools such as Chatfuel, Dialogflow, Microsoft Bot Framework, Twilio, Alexa Skills, and Google Actions and deploying them on channels like Facebook Messenger, Amazon Alexa and Google HomeAbout This Book⢠Understand the different use cases of Conversational UIs with this project-based guide⢠Build feature-rich Chatbots and deploy them on multiple platforms⢠Get real-world examples of voice-enabled UIs for personal and home assistanceWho This Book Is ForThis book is for developers who are interested in creating interactive conversational UIs/Chatbots. A basic understanding of JavaScript and web APIs is required.What You Will Learn⢠Design the flow of conversation between the user and the chatbot⢠Create Task model chatbots for implementing tasks such as ordering food⢠Get new toolkits and services in the chatbot ecosystem ⢠Integrate third-party information APIs to build interesting chatbots ⢠Find out how to deploy chatbots on messaging platforms⢠Build a chatbot using MS Bot Framework⢠See how to tweet, listen to tweets, and respond using a chatbot on Twitter⢠Publish chatbots on Google Assistant and Amazon AlexaIn DetailConversation as an interface is the best way for machines to interact with us using the universally accepted human tool that is language. Chatbots and voice user interfaces are two flavors of conversational UIs. Chatbots are real-time, data-driven answer engines that talk in natural language and are context-aware. Voice user interfaces are driven by voice and can understand and respond to users using speech. This book covers both types of conversational UIs by leveraging APIs from multiple platforms. We'll take a project-based approach to understand how these UIs are built and the best use cases for deploying them. We'll start by building a simple messaging bot from the Facebook Messenger API to understand the basics of bot building. Then we move on to creating a Task model that can perform complex tasks such as ordering and planning events with the newly-acquired-by-Google Dialogflow and Microsoft Bot framework. We then turn to voice-enabled UIs that are capable of interacting with users using speech with Amazon Alexa and Google Home. By the end of the book, you will have created your own line of chatbots and voice UIs for multiple leading platforms.Style and approachThis is a practical book, where each chapter focuses on a chatbot project. The chapters take a step-by-step approach to help you build intelligent chatbots that act as personal assistants.
Frequently asked questions
Information
Restaurant Search
- Understand the basics of MS Bot Framework
- Build a chatbot with the Botbuilder Node.js library
- Register the bot with Bot Framework
- Host the bot in the cloud
- Understand message types and card types
- Manage context and conversational flow
- Integrate with the Zomoto data API
- Integrate the bot with Skype
MS Bot Framework
Channel emulator
Building a bot
- Create a Node.js project called foodie-bot:
> npm init
- Install the two libraries that we need to use:
> npm install botbuilder --save
> npm install restify --save
- Create a file named app.js.
- In app.js, paste the following code (from the Bot Framework tutorials):
var restify = require('restify');
var builder = require('botbuilder');
// Lets setup the Restify Server
var server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function () {
console.log('%s listening to %s', server.name, server.url);
});
// Create chat connector for communicating with the Bot Framework Service
var connector = new builder.ChatConnector({
appId: process.env.MICROSOFT_APP_ID,
appPassword: process.env.MICROSOFT_APP_PASSWORD
});
// Listen for messages from users
server.post('/foodiebot', connector.listen());
// Echo their message back.. just parrotting!
var bot = new builder.UniversalBot(connector, function (session) {
session.send("You said: %s", session.message.text);
});
- Save the file.
- Run the emulator. In the address bar, type the following address and connect:
- The emulat...