Working on a chatbot on Lex amazon, and have set Date
,Time
, location
parameters i have set the prompt to ask when they're not supplied according to the slot type.
When i give a wrong or bad date values like sughdfusf
or ice cream
or such it asks for the value again , same with time but it isn't the case with location as it takes completely random values not defined in the slot type AMAZON.US_CITY
.How can i fix it and why is it occurring?
Lex is thinking that sughdfusf
is a city name, so it is allocating this to AMAZON.US_CITY
.
You can either report this issue to amazon team and wait for them to fix it or you can use below workaround.
DialogCodeHook
, use some third party api to validate the city
nameElicitSlot
in case validation failedHope it helps, let me know if you have further doubts.