You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a few hours trying to figure out why alexa raised an error on my directive response instead of speeching configured prompt for missing slots, It turned out that alexa-app includes outputSpeech object in its reply, which seems exactly to be the problem. Given a Dialog.Delegate directive telling to rely only on model dialogs, Alexa expect not to have outputSpeech attribute besides this directive.
So I patched this with an ugly delete before replying, but I guess fixing your response construction might benefits to some other users :-)
The monkey patch, within any alexa-app handler getting response object:
if (response.response.response.outputSpeech) {
delete response.response.response.outputSpeech
}
The text was updated successfully, but these errors were encountered:
Nicky31
changed the title
Patch for directive Dialog.Delegate not working
Patch for directive Dialog.Delegate
Oct 8, 2018
If I'm understanding you correctly, the correct fix for this is to apply that (making sure there's no outputSpeech in the underlying Alexa response) in the situation where there's a Dialog.Delegate directive to rely only on model dialogs.
If that's the case, it sounds to me like that's a great case to add this into the codebase itself, with the appropriate logic to make sure we only remove outputSpeech in that specific scenario.
Hi,
After taking a look at your codebase to fix this point, I've figured out outputSpeech is not initialized on the construction of responses but it is in clear() method.
Any reason for this ? Why not simply delete this attribute ? Looks a bit weird. I guess outputSpeech deletion (instead of rewrite) in clear() would do the trick, but i'm wondering if it would break anything.
Hi,
After a few hours trying to figure out why alexa raised an error on my directive response instead of speeching configured prompt for missing slots, It turned out that alexa-app includes outputSpeech object in its reply, which seems exactly to be the problem. Given a Dialog.Delegate directive telling to rely only on model dialogs, Alexa expect not to have outputSpeech attribute besides this directive.
So I patched this with an ugly delete before replying, but I guess fixing your response construction might benefits to some other users :-)
The monkey patch, within any alexa-app handler getting response object:
The text was updated successfully, but these errors were encountered: