dialogflow-java-client icon indicating copy to clipboard operation
dialogflow-java-client copied to clipboard

Support of Arrays in followupEvent

Open aznamier opened this issue 8 years ago • 0 comments

Since introduction of "list" parameters in api.ai it is possible to bind the json array from the response of the followup event (AIEvent) to a "list" variable. This allows to output nice data driven buttons etc.

AIEvent has currently support of parameter map key=value where both key and a value are strings.

We should be able to support JsonElement as a value here, so that more complex types eg. array can be sent in the response. screen shot 2017-09-11 at 18 07 44 screen shot 2017-09-11 at 18 08 47

{
  "speech": "some response",
  "followupEvent": {
    "name": "show-list-success",
    "data": {
      "running": [
        "server1",
        "server2",
        "server3"
      ],
      "stopped": [
        "server7",
        "server9"
      ]
    }
  }
}

aznamier avatar Sep 11 '17 17:09 aznamier