Search code examples
amazon-web-servicesaws-lambdachatbotamazon-lex

which slot type should I use for any data type or we say which can accept string type data in AWS lex


I have created a bot using aws-lex where I created a slot and slot-type is user defined and expand with user utterances, but this is not working as expected. This slot is not accepting all utterances we enter though test channel and re-prompting the slot question again. Is there any way we can create a slot-type which can accept any string utterances? or any inbuilt slot-type is there which accepts all data types? Any help would be appreciated.


Solution

  • By default Amazon Lex does not have any slot type to accept any string.

    However, you can create a slot without any value for the intent and uncheck the required checkbox. Then in Lambda initialization and validation hook, just grab the input of user from event['inputTranscript'] and assign that value to the slot.

    Hope it helps.