Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: v4.1.x
Version: 4.

...

1.x


Output Configurations are rather simple as they contain prepared sentences the Chatbot should reply to the user (depending on the actions coming from the behavior rules).

...

Code Block
languagejs
titleSimple Output Configuration
linenumberstrue
{
  "outputSet": [
    {
      "action": "welcome",
      "outputs" : [
         {
            "keytype" : "welcometext",

           "outputValuesvalueAlternatives" : [
                 "Welcome! I am E.D.D.I."
          ]
 ]
		}       }
      ]
    }
  ]
}

The configuration contains an array of "outputsoutputSet", which can contain one or more output objects.

The minimum amount of values that you need to provide in order be functional are key and outputValues action and outputs

Now let's look at a more complex output configuration file:

Code Block
languagejs
titleComplex Output Configuration
linenumberstrue
{
  "outputSet": [
    {
      "action": "welcome",
      "timesOccurred": 0,
      "outputs" : [
        {
         { "type": "text",
          "keyvalueAlternatives" : "welcome",
  : [
            "Welcome!"
          ]
        },
        {
         "outputValues" : [ "type": "text",
          "valueAlternatives": [
            "Welcome! I am E.D.D.I. How are you doing today?"
          ]
        }
      ],
      "quickReplies": [
    "occurrence" : 0    {
          "value": "I am fine",
          "expressions": "feeling(fine)"
        },
         {
 {
          "value": "not so good",
          "key" "expressions": "feeling(not_good)"
        }
      ]
    },
    {
      "action": "greet",
      "timesOccurred": 0,
      "outputValues" : [outputs": [
        {
          "type": "text",
          "valueAlternatives": [
            "Hi there! Nice to meet up! :-)",
				            "Hello you! It is a pleasure meeting you.. :-)"
          ]
        }
      ]
    },
    {
      "action": "occurrencegreet",
:   0   "timesOccurred": 1,
    },  "outputs": [
      {  {
          "keytype" : "greettext",
            "outputValuesvalueAlternatives" : [
                 "Did we already say hi ?! Well, twice is better than not at all! ;-)",
				
            "I like it if people are polite and greet twice, rather than not at all ;-)"
          ]
        }
],      ]
    },
 "occurrence" : 1 {
       }"action": "say_goodbye",
      "outputs": [
 {       {
          "keytype" : "say_goodbyetext",
 
          "outputValuesvalueAlternatives" : [ 
   
            "See you soon!"
          ]
        }
]      ]
  }  }
  ]
}


key

desciption

keyactionThis will be the "actions" coming from the behavior rules. If a rule succeeds, the defined action will be stored in the conversation memory. Those stored actions will be match with this keyoutputValues
outputsThis array of outputValues output objects are the output sentences outputs that will be replied back to the user in case the action matched the action key. You can define multiple output objects, which represent separate chat bubbles on the client side. If more than one output valueAlternatives is defined, one will be picked randomly. If this output will be triggered again in a future conversation step, then another output of this array will be favored in order to avoid repetition. (If all available outputs have been selected, it is randomized again like in the beginning). The type is mainly there to be able to distinguish the type of output on the client side (e.g. image, video, audio, etc).
quickReplies This is an array of QuickReply objects. Each object must contain a value, which is the text the user should be displayed (e.g. as button) in the conversation flow. The expressions is optional, you can define one or more comma separated expressions that define the meaning of this QuickReply. Those expression will be temporarily taken into account in the semantic parser in the next conversation step. So if a user chooses one of the quick replies, the parser would recognize them (even if not defined in any of the dictionaries explicitly) occurrenceand resolve them with the expressions defined within this quick reply.
timesOccurredHow often this action should have occurred within that conversation in order to be selected as output to the user (thus, if value of 1, it would be chosen if the action occurs for the second time)

...