Hands-On Chatbots and Conversational UI Development
eBook - ePub

Hands-On Chatbots and Conversational UI Development

Srini Janarthanam, Phil D Hall, Vamsi Venigalla

  1. 392 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Hands-On Chatbots and Conversational UI Development

Srini Janarthanam, Phil D Hall, Vamsi Venigalla

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Hands-On Chatbots and Conversational UI Development est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Hands-On Chatbots and Conversational UI Development par Srini Janarthanam, Phil D Hall, Vamsi Venigalla en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Ciencia de la computaciĂłn et Inteligencia artificial (IA) y semĂĄntica. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Restaurant Search

In previous chapters, we dealt with conversation management in one of the two ways—built from scratch (Chapter 3, Let's Talk Weather) or using GUI tools such as Dialogflow (Chapter 4, Building a Persona Bot) and Chatfuel (Chapter 1, Introduction). In Dialogflow and Chatfuel, the conversational flow was specified by the developer using visual elements (such as forms) on their custom-built web-based editor. However, it may not always be the best way to tell the system how to manage the conversation. On the other hand, we built a simple conversation manager in Java. Conversation management can get complicated in complex human-chatbot conversations. Luckily, we have got toolkits that allow us to build conversation management modules using code libraries specifically built for the purpose.
In this chapter, we are going to explore how a conversation management module can be built using an existing library—Bot Builder SDK. First, we will understand the MS Bot Framework that Bot Builder SDK is a part of. We will install the necessary software and libraries and learn to build chatbots using the SDK, test them on the emulator, and deploy them in the cloud. Next, we will learn about the rich presentation options, and the devices for which the conversational flow can be designed. We will then explore the Zomato service for restaurant data and integrate it into a chatbot built using the Bot Builder SDK. We will finally deploy it on Skype.
By the end of this chapter, you will be able to:
  • 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

MS Bot Framework is a Microsoft product for chatbot development. It houses three products: Bot Builder SDK, Bot Framework Portal, and channels. Bot Builder SDK is the toolkit for building chatbots. It has libraries of classes and code that represent various elements of a conversation. These can be used in our development process to build chatbots at a faster pace than building them from scratch. The Bot Framework Portal is used to register the bot in order to manage it efficiently and there is a host of tools for analytics and diagnostics that can be used on this portal. Finally, the framework provides a unified approach to integrating with several channels.
There are a huge number of channels that you can integrate your bot with, including Skype, Facebook Messenger, Kik, Telegram, Slack, MS Teams, and Twilio. You can also create a web chat client using the portal that can be embedded on any website. In addition to the three tools, there are two other tools that are very useful during the development process: channel emulator and channel inspector.

Channel emulator

Before we begin, we need to install software called a channel emulator. We will be using this to emulate the channel (for example, Skype) to connect to the bot locally for development and testing purposes. You can chat with your bot as well as inspect the messages sent and received to identify any bugs.
To download it, go to the following page:
https://github.com/Microsoft/BotFramework-Emulator/releases/tag/v3.5.31
Download the version based on your needs and install it on your computer.

Building a bot

Let us now look at the steps to build a chatbot. Here we will use the botbuilder library and create a bot using Node.js:
  1. Create a Node.js project called foodie-bot:
> npm init
  1. Install the two libraries that we need to use:
> npm install botbuilder --save
> npm install restify --save
  1. Create a file named app.js.
  2. 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);
});
Notice that there are two classes, UniversalBot and ChatConnector, that the Bot Framework's Node.js SDK provides. UniversalBot is the class where we define the conversation flow, while the ChatConnector class connects the bot to the chat channel. In the previous code, we used the session.send() method to send text messages to the chat channel.
  1. Save the file.
  2. Run the emulator. In the address bar, type the following address and connect:
http://localhost:3978/api/messages
At this stage, you don't have to provide an app ID or password.
  1. The emulat...

Table des matiĂšres