Code Monkey home page Code Monkey logo

qisdk-sample-chatbot's Introduction

ChatbotSample

ChatbotSample is an Android application for Pepper the robot that demonstrates how to implement a chatbot thanks to the Android QiSDK. (https://qisdk.softbankrobotics.com)

This sample relies on an online Dialogflow agent and a local qichatbot. The chat engine utilizes both chatbots to provide a dialog whose progress is structured according to a functional scenario while providing casual discussion.

  • The local qichatbot conversation related to pepper including information about the robot and some simple robot actions.
  • The Dialogflow chatbot deals with some general questions that doesn't exist in the qichatbot topics.

Minimum configuration

  • Pepper 1.9
  • API Level 3

Getting started

For the sake of simplicity, this sample uses a Dialogflow v1 agent. The class DialogflowChatbot.java shows how to interact with such an agent.

Creating a Dialogflow agent

In order to run the application, you need to create first your own agent via the Dialogflow console (https://console.dialogflow.com).

Ensure you select V1 API in the General tab of the settings page.

Client access token

Once your agent is created, you should make the provided client access token available to the Android project. This token is needed to connect the application to the agent.

In the global gradle.properties file located in your ~/.gradle folder, add the following line:

CHATBOT_SAMPLE_DIALOGFLOW_TOKEN=your_client_access_token

This avoids keeping the token under version control.

Populating the agent

Your Dialogflow agent may be populated either by hand (via the console) or by importing an already made agent. Learning how to create Dialogflow intents goes beyond the scope of this sample. Therefore we provide you with a sample agent description you just have to import in your own agent.

In the Dialogflow console:

  • Go to the Settings page of the agent
  • Choose the Export and Import option
  • Click on Restore from zip
  • Then follow instructions to upload the [DialogflowChatbotAgent.zip] file.

This sample agent provides fallback intents that reply to some general questions.

Additional resources

Overview UML diagrams

A PlantUML class diagram and a sequence diagram are available at the root of this project.

The PlantUML integration plugin is needed to display them in AndroidStudio. Alternatively you can visit http://www.plantuml.com/plantuml.

Licence

See the COPYING file for the license.

qisdk-sample-chatbot's People

Contributors

riadhsoftbank avatar adrienkvaternik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.