Conversational Content Library

wipExperimental feature, still in progress

What is Conversational Content Library

Conversational Content Library is an Android library that provides predefined inputs and/or outputs:

  • Inputs are conversational
  • Outputs are conversational and can additionally be accompanied by robotic behaviors.

The provided content is split in different domains such as greetings, volume control, farewell, date and time etc. It is possible to use one or several domain(s) in a chat.

  • To discover how to implement the Conversational Content Library, see: Let’s try it.
  • For further details about the different domains, see: List of domains.

Let’s try it

Conversational Content Library allows you to make a Chat synchronously or asynchronously.

This example, shows the asynchronous version.

Step Action

Add the base dependency to your module’s build.gradle file:

implementation 'com.aldebaran:qisdk-conversationalcontent:0.13.0'

Add the domain dependencies you want to use to your module’s build.gradle file.

Here, for example, we want to add Not understood and Repeat domains:

implementation 'com.aldebaran:qisdk-conversationalcontent-notunderstood:0.13.0'
implementation 'com.aldebaran:qisdk-conversationalcontent-repeat:0.13.0'

Prepare your resources:

QiContext qiContext;
List<Chatbot> myChatbotsList;

// Don't forget to assign the qiContext from onRobotFocusGained and your myChatbotsList.
// Then, create the list of ConversationalContent you want to use.

List<AbstractConversationalContent> conversationalContents = Arrays.asList(
    new NotUnderstoodConversationalContent(),
    new RepeatConversationalContent()
);

Make your chat:

Chat chat = ConversationalContentChatBuilder.with(qiContext)
      .withChatbots(myChatbotsList)
      .withConversationalContents(conversationalContents)
      .build()

Run it:

chat.async().run()

List of domains

Domain Implementation & Purpose
Greetings
implementation 'com.aldebaran:qisdk-conversationalcontent-greetings:0.13.0'

Make the robot answer to user’s greetings by using natural language interaction.

Farewell
implementation 'com.aldebaran:qisdk-conversationalcontent-farewell:0.13.0'

Make the robot answer to user’s farewell by using natural language interaction.

Note

This domain provides also listeners.

For further details, see: Farewell optional listeners.

Date & Time
implementation 'com.aldebaran:qisdk-conversationalcontent-datetime:0.13.0'

Make the robot answer to user’s request about current time, date or some date’s weekday by using natural language interaction.

Volume control
implementation 'com.aldebaran:qisdk-conversationalcontent-volumecontrol:0.13.0'

Allows the user to adjust the robot’s volume by using natural language interaction.

Gesture control
implementation 'com.aldebaran:qisdk-conversationalcontent-gesturecontrol:0.13.0'

Make the robot raise arms, open hands or turn his head on user’s request.

Navigation control
implementation 'com.aldebaran:qisdk-conversationalcontent-navigationcontrol:0.13.0'

Make the robot move forward, backward, left or right by using natural language interaction.

Not understood
implementation 'com.aldebaran:qisdk-conversationalcontent-notunderstood:0.13.0'

Allows the robot to make feedbacks when he didn’t understand user’s inputs or when he has no answer to user’s inputs.

Should be used each time developers want the robot to make some feedbacks in case the robot didn’t understand user’s inputs or when the robot has no answer to user’s inputs.

Repeat
implementation 'com.aldebaran:qisdk-conversationalcontent-repeat:0.13.0'

Make the robot repeat his last sentence or user’s last sentence by using natural language interaction.

Farewell optional listeners

It is possible also to use some listeners:

FarewellConversationalContent farewellConversationalContent = new FarewellConversationalContent(new FarewellConversationalContentListeners.OnDepartureSaidListener() {
    @Override
    public void onDepartureSaid(QiContext qiContext) {
    }
}, new FarewellConversationalContentListeners.OnDepartureConfirmedListener() {
    @Override
    public void onDepartureConfirmed(QiContext qiContext) {
    }
}, new FarewellConversationalContentListeners.OnDepartureDeniedListener() {
    @Override
    public void onDepartureDenied(QiContext qiContext) {
    }
});

ConversationalContent.makeChat(qiContext, farewellConversationalContent);

The listener … Is raised when the user…
onDepartureSaid indicates that he will leave.
onDepartureConfirmed confirms to the Robot that he leaves.
onDepartureDenied tells the Robot that he is not any more going to leave.

Tip: to test Farewell domain and its listeners, try to log something on screen.