susi_linux icon indicating copy to clipboard operation
susi_linux copied to clipboard

Loop through action types and display result for all actions

Open chiragw15 opened this issue 7 years ago • 1 comments

Actual Behaviour

Query "multi3". The sever response contains 3 action types but only result of first is displayed. Also for map type only first action type is used.

Expected Behaviour

"actions": [
      {
        "type": "answer",
        "expression": "Singapore is a place with a population of 3547809. Here is a map: https://www.openstreetmap.org/#map=13/1.2896698812440377/103.85006683126556"
      },
      {
        "type": "anchor",
        "link": "https://www.openstreetmap.org/#map=13/1.2896698812440377/103.85006683126556",
        "text": "Link to Openstreetmap: Singapore"
      },
      {
        "type": "map",
        "latitude": "1.2896698812440377",
        "longitude": "103.85006683126556",
        "zoom": "13"
      }
    ]

If response is of this type, then the client should loop through all the actions and display result one after other with delay provided in the response. So, ideally the result of this response should be :

  • 1st message : Singapore is a place with a population of 3547809. Here is a map: https://www.openstreetmap.org/#map=13/1.2896698812440377/103.85006683126556
  • 2nd message after 0 delay : Link to Openstreetmap: Singapore
  • 3rd message after 0 delay: A map displaying the given coordinates and zoom level

For response this

"actions": [
      {
        "type": "answer",
        "expression": "Line 1"
      },
      {
        "type": "answer",
        "delay": 400,
        "expression": "Line 2"
      },
      {
        "type": "answer",
        "delay": 1000,
        "expression": "Line 3"
      }
    ]

Response should be

  • 1st message Line 1
  • 2nd message after 0.4 seconds of 1st message : Line 2
  • 3rd message after 1 second of 1st message : Line 3

chiragw15 avatar Jun 05 '17 09:06 chiragw15

@Orbiter There is some confusion with me. In a headless client, what shall we do for other data type like Tables and RSS, I mean , what should client speak in such a case? Alexa in such cases says "More results are on the Alexa App" and results pop up there and not spoken but how do we handle it? Or shall we postpone it till #25 and have that feature in Android Configuaration Interface for Susi Hardware (like Alexa App for Android, it will be integrated i current Susi Android App)

betterclever avatar Jun 16 '17 06:06 betterclever