Alexa Dialog Model Step and dialogState is never in COMPLETED

*爱你&永不变心* 提交于 2019-12-23 05:15:52

问题


I'm implementing an Alexa Dialog Model with an PHP Endpoint. I used the Alexa doc (https://developer.amazon.com/fr/docs/custom-skills/dialog-interface-reference.html)

Here is my example: My skill:

RequestIntent

Utterance : add an {obj} in the bedroom

Slots : {obj} / Slot Filling

Phrase:

Me : Alexa, Add an object in the bedroom

Alexa : What object do you want to add in bedroom ?

Me : I would like to add a cars in the bedroom

Alexa : You want to add a car in the bedroom ?

Me : Yes

STEP1:

DialogState is STARTED

I use ElicitSlot to set the {obj} slot

STEP2:

dialogState is IN_PROGRESS.

I use ConfirmIntent to ask user to confirm it

STEP3:

User say yes/no

ConfirmIntent is now set to CONFIRMED/DENIED

BUT still in IN_PROGRESS

dialogState should be COMPLETED because i set all of my slot and intent value right ? So why should not be working in here ?

Thanks by advance


回答1:


The reason your dialogState is not COMPLETE because you are using Dialog.ElicitSlot directive. The COMPLETED status is only possible when you use Dialog.Delegate directive.

More information on controlling the dialog with Dialog.Delegate directive here




回答2:


DialogState has only the following status: "STARTED" , "IN_PROGRESS" , "COMPLETED.

The reason why is not completed could be because not all the steps are complete or the IntentRequest has not all the required slot values.




回答3:


For me, I must enable the Auto Delegation option in Interfaces from Alexa Developer Console.

Let Alexa automatically determine and complete each step of the dialog, based on your dialog model. Your skill gets a single IntentRequest when the dialog is complete. You can override this setting at the intent level. Learn More about Auto Delegation.

Once all the steps are complete, the skill receives the final IntentRequest with dialogState set to COMPLETED.



来源:https://stackoverflow.com/questions/53176017/alexa-dialog-model-step-and-dialogstate-is-never-in-completed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!