Conversation Support

Violet's core is designed to aid in building Conversational applications. Basic Voice scripts require minimal coding, and longer conversations are enabled using Goals.

Included Plugins

Complexity in voice scripts is hidden using plugins. Plugins support connecting to data stores like Postgres and Force.com, and we are working on enabling more to be built.

Samples

Examine one of our built-out samples to get ideas on how to build scripts. We are looking forward to hearing how you customize or create your own scripts.

Respond to Users

Declare what you would like to respond to from the user and what your response would be when the intent is triggered.

violet.respondTo({
  expecting: "Whats next on my todo",
  resolve: function(response) {
    var nextItem = todoSvc.getNextItem();
    response.say(`Next item on your list is ${nextItem}`);
}});

Get Input from Users

Declare input variables and use them when expecting an input from users.

violet.addInputTypes({
  'todoItem': LITERAL
});

violet.respondTo({
  expecting: 'Remind me to do [[todoItem]]'],
  response: function(response) {
    todoSvc.add(response.get('todoItem'));
    response.say('Added [[todoItem]] to your list');
}});

Conversation Goals

Sophisticated conversations are supported by grouping user intents and responses into goals. When a user indicates a need for a discussion on a particular topic, a script can just add the topic as a goal to be met.

violet.respondTo({
  expecting: 'Remind me [to do [todoItem]]',
  resolve: (response) => {
    if (quipSvc.getCategoryCount() > 1)
      response.addGoal('getCategory');
    //...
}});

violet.defineGoal({
  goal: 'getCategory',
  prompt: 'Which category?',
  respondTo: [{
    expecting: 'Category [[categoryNo]]',
    resolve: (response) => {
      //...
}]});

Questions?

We are listening on Gitter. Drop by if you have Questions or Comments.