Integrating a Chatbot: Dialogflow

How to make a Pepper that can tell you jokes with an external chatbot
Integrating a Chatbot: Dialogflow

What the lesson is about

In order to make a Pepper that can tell you jokes, you will integrate a Web Chatbot, in this case Dialogflow, into a QiSDK application for Pepper, and use one of Dialogflow’s prebuilt agents. You will also make sure it degrades gracefully when Pepper is not connected to the internet.

What you will need

  • A Pepper QiSDK (NAOqi 2.9)
  • Android Studio with the QiSDK plugin
  • An internet connection
  • A Dialogflow account (if you don’t have one, see “Create a Dialoflow Account”)

What you should know about

You should already know about:

  • How to make Android QiSDK applications
  • How to integrate a QiChatbot in an application (see “Discovering QiChat”)
  • Kotlin Development
    Knowing about Dialogflow helps, but is not necessary.

Applicable Use Cases

Web Chatbots (like Dialogflow, Azure, Watson, etc.) are a tool that can be used for many different situations.
For Pepper, they can be particularly useful when:

  • You want to integrate Pepper with an existing solution that already uses them
  • You want it to be easy to update your dialog content without installing anything new on the robot (in this case, through the Dialogflow console)

In addition, whatever your application, today’s tech-savvy users are getting used to chatbots like Siri or Google Assistant that can answer all kinds of outlandish requests (“What is the capital of Uganda? Who is Susan Calvin?”), and may expect your Pepper to do so even if that has nothing to do with why you’re here. To do that, you can take advantage of the vast library of prebuilt agents that handle many situations (asking for the weather, ordering a taxi, small talk, etc.) in many languages.

  • Integrating a Chatbot: Dialogflow
  • Creating a Dialogflow agent
  • Testing your Dialogflow agent in standalone
  • Integrating into the QiSDK application
  • Adding a QiChatbot for fallback
  • Understanding a few more key concepts
Let's go!