简体   繁体   中英

amazon lex regarding slot types used

I am facing problem regarding the slot types used. I want a slot type that must take any kind of input from the user and it must be of free formed data. I had already tried using the AMAZON.POSTALADDRESS but it failed many times and it is asking the question again and again.
I had also tried using the AMAZON.STREETADDRESS it also failed and the bot is repeating the question again and again and quitting out of the app.
Please help me out.
Thanks in advance.

You can try this:

  • Make a slot
  • Do not tick required option
  • In the DialogCodeHook, make the slot value NULL
  • Now, check if the slot is NULL then provide ElicitSlot
  • In ElicitSlot , take the inputTranscript and assign it to the slot value

slots = intent_request['currentIntent']['slots'] slots['your_slot'] = intent_request['inputTranscript']

Hope it helps.

Try to use AMAZON.MoviesSeries as a slot type.

I hope it will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM