Chat Editor

Chat Editor is an extension of Android Studio’s text editor.

To make the Chat Editor available in Android Studio, install the Pepper SDK. For further details, see: Installing the Pepper SDK plug-in.

Chat Editor’s purpose is to help editing Chat topic files.

What is a Chat Topic

A chat topic allows you to give your robot conversational skills by using a list of dialog rules that describe how to reply to what the user says. The topic and its rules are written using the QiChat Language language.

Managing default and multi-languages

As Pepper is able to understand and talk several human languages, it is possible to create several versions of a chat topic, each one supporting a language.

Before creating such variants, it is mandatory to create the default one.

Tip

  • The first time you name a chat topic, it will create the default one.

    ../_images/chat_topic_default.png

    Note that it is not possible to select a specific language.

  • Create again chat topics using the same name, you will be able to select a human language in order to create variants.

    ../_images/chat_topic_lang.png

Creating a new Chat Topic

Step Action
In Android Studio choose File > New > Chat Topic.

Enter a file name.

../_images/chat_topic_default2.png

Click the Create button.

The new Chat Topic file is added to the /res/raw folder and displays its default content.

Replace the default content by your own QiChat content.

You can for example, uncomment the default content in order to test it:

../_images/new_topic_sample.png

For further details, see: QiChat Language.

Creating a variant Chat Topic for a specific language

Step Action
In Android Studio choose File > New > Chat Topic.

Enter the file name of an existing chat topic then select a language and a region.

../_images/chat_topic_lang2.png

Click the Create button.

The new Chat Topic file is added to the /res/raw-<Language Code>-r<Region Code> folder and displays its default content.

Replace the default content by your own QiChat content.

You can for example, uncomment the default content in order to test it:

../_images/new_topic_sample.png

For further details, see: QiChat Language.

Using a Chat Topic

It is now time to use the topic in your code.