question

habuma avatar image
habuma asked

ASK CLI dialog command and elicitation/validation

I've created a skill (amzn1.ask.skill.6fde2def-f5ff-4532-a097-3432424c051c) with slot elicitation defined in the model. When I deploy it and test it with an actual device or via the developer console, it works as expected. But when testing it with the ASK CLI's dialog command, it only works if I provide all slot values.


For example, with an actual device or the developer console if I say "plan a trip to Mars", it prompts me for the departure date and the return date. But if I do the exact same thing with the dialog command, it spins for awhile before replying "[Error]: An unexpected error occurred.". With the --debug turned on, I see several GET requests in a row, each with a status of "IN_PROGRESS", followed by a final GET request with a status of "FAILED" and a message of "An unexpected error occurred."


This particular case is in regard to elicitation prompts, but I've seen similar behavior for validation prompts.


Does the ASK CLI dialog command not support elicitation/validation dialog prompts? Or am I doing something wrong?

alexa skills kitask clidialog model
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

habuma avatar image
habuma answered

I'll answer my own question: Apparently it works now. I know it wasn't working not that long ago (perhaps even less than a week ago). But today I received an email highlighting what's new with the Alexa SDK claiming that this now works. I tried it...and yes, it works. To whomever made it work, thanks!

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

habuma avatar image
habuma answered

Perhaps I spoke too soon. I know, for a fact, that this was working last week. But now, replaying the same `ask dialog` script as before, it no longer works (although it still works as expected in the developer console simulator).


Here's the `ask dialog` script I'm using:


```

{

"skillId": "amzn1.ask.skill.6fde2def-f5ff-4532-a097-3432424c051c",

"locale": "en-US",

"type": "text",

"userInput": [

"open star port seventy five travel",

"let's plan a trip to mars"

]

}

```


What's more, when I do `ask api nlu-profile`, the selected intent matches and "Mars" matches the right slot with status of "ER_SUCCESS_MATCH". And, I can see that the intent is multi-turn and the expected prompt is chosen:


```

{

"consideredIntents": [],

"multiTurn": {

"dialogAct": {

"targetSlot": "departureDate",

"type": "Dialog.ElicitSlot"

},

"prompt": "When will your trip start?",

"token": "[REDACTED]

},

"selectedIntent": {

"confirmationStatus": "NONE",

"name": "ScheduleTripIntent",

"slots": {

"departureDate": {

"confirmationStatus": "NONE",

"name": "departureDate"

},

"destination": {

"confirmationStatus": "NONE",

"name": "destination",

"resolutions": {

"resolutionsPerAuthority": [

{

"authority": "amzn1.er-authority.echo-sdk.amzn1.ask.skill.6fde2def-f5ff-4532-a097-3432424c051c.PLANETS",

"status": {

"code": "ER_SUCCESS_MATCH"

},

"values": [

{

"id": "name",

"name": "Mars"

}

]

}

]

},

"value": "mars"

},

"returnDate": {

"confirmationStatus": "NONE",

"name": "returnDate"

}

}

},

"sessionEnded": false

}

```


It just seems that `ask dialog` is broken. Anyone seeing the same thing?

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.