Book Image

Hands-On Chatbots and Conversational UI Development

By : Srini Janarthanam
Book Image

Hands-On Chatbots and Conversational UI Development

By: Srini Janarthanam

Overview of this book

Conversation 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.
Table of Contents (11 chapters)

Building your first bot

Chatfuel bots can be published on two deployment platforms: Facebook Messenger and Telegram. Let us build a chatbot for Facebook Messenger first. In order to do that, we need to create a Facebook Page. Every chatbot on Facebook Messenger needs to be attached to a page. Here is how we can build a Facebook Page:

  1. Go to https://www.facebook.com/pages/create/.
  2. Click the category appropriate to the page content. In our case, we will use Brand or Product and choose App Page
  3. Give the page a name. In our case, let's use Get_Around_Edinburgh. Note that Facebook does not make it easy to change page names. So choose wisely.
  4. Once the page is created, you will see Chatfuel asking for permission to connect to the page:
  1. Click CONNECT TO PAGE. You will be taken to the bot editor.
  2. The name of the bot is set to My First Bot. It has a Messenger...