Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Support of Arrays in followupEvent #38

Open
aznamier opened this issue Sep 11, 2017 · 0 comments
Open

Support of Arrays in followupEvent #38

aznamier opened this issue Sep 11, 2017 · 0 comments

Comments

@aznamier
Copy link

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"
      ]
    }
  }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant