0
votes

I've a Python-coded backend which provides an API for "getting all the tasks of a project", if you give the project ID.

I want to do this request using Lex and Lambda from the AWS online tools, so I was thinking of something simple like : "Give me the tasks for project 145" then the lambda calls the API with the variable "145" and show the tasks to the user.

I did the pizzaOrder tutorial and everything was clear, but now that I want to do this basic thing with my project, I've got a problem: my projects are not in slots, because obviously the users can create and delete projects. So "145" is not in a slot.

So how to deal with such a case? Can Lex recognize a word that is not in a slot then use it like a variable?

1
What service linked role you have used? Is AWSServiceRoleForLexBots having permission to invoke aws lambda?ManirajSS
@ManirajSS Not sure I understand your question. My role for lambdas is lambda-exec-role-for-lex-get-started (I don't even know where it comes from, maybe one of the tutos I followed).Destal

1 Answers

3
votes

Short answer: Yes. Lex/Alexa can recognize words out of the defined values for a custom slot type.

This is taken from the documentation (Applies both to Alexa and Lex):

A custom slot type is not the equivalent of an enumeration. Values outside the list are still returned if recognized by the spoken language understanding system. Although input to a custom slot type is weighted towards the values in the list, it is not constrained to just the items on the list. Your code still needs to include validation and error checking when using slot values.