0
我只有1個意圖,它必須要求密碼。如果PIN碼不正確,則再次提問,最多3次。亞馬遜Alexa - 詢問相同的插槽超過兩次
什麼是實施它的正確方法? (我用的alexa-SDK用的NodeJS)
我試圖實現兩個方法,但他們失敗EXCEEDED_MAX_REPROMPTS:
if pin_is_correct
emit(:tell, "cool")
else
emit(:ask, "what is your pin?", "what is your pin?")
和
unless pin_is_correct
let updatedIntent = this.event.request.intent
delete updatedIntent.slots.MY_PIN_SLOT_NAME.value
this.emit(':delegate', updatedIntent)
if this.event.request.dialogState !== 'COMPLETED'
this.emit(':delegate')
emit(:tell, "cool")
任何例如解決同樣的問題?
謝謝!但是我的解決方案是避免使用Dialog。例如:'if(!slot或pinIsIncorrect()){this.emit(':ask','pin again?'); }'。您不需要更改SDK。 – SergioArcos