Amazon Lex: Validate Slot data with Lambda
ฝัง
- เผยแพร่เมื่อ 26 ส.ค. 2024
- In this video, we'll use Lambda to validate Slot data.
Note: The videos in this Playlist are meant to be viewed sequentially, as they progressively implement an Amazon Lex ChatBot solution.
Source Code: github.com/Cum...
This is the best video I've seen on this topic so far! Most of them omit the lambda part which is the most important, just use the sample examples already given by aws, and don't show how to integrate it into a website. This was clear and easy to understand.
Thanks for the kind words. I’m glad you found it helpful!
Thank you my guy. This was a good intro to Lexing it up!
Great explanation. I found it very useful in understanding how Lex and Lambda works together. Thanks...
Glad it was helpful!
Oh man, this is fantastic. Thank you very much!
Glad you like it!
Hi Sir, I love your videos. Can you also make a video explaining about composite slots type and also how to use it in Lambda? I am currently trying to create a Car Recommendation Chat Bot so I want to link every custom slots type like Color, Make, Model .etc to one composite slots type Car and want to use it with Lambda but I couldn't figure it out.
Great video@ Thanks
Glad it was helpful!
When I try to send message in `messages` list along with dialogAction as elicitSlot it shows the message but the doesn't show the message of elicitSolt auto.
This is awesome, great work! I just completed the first video and I'm wrapping this one up now and it's great. Do you have any intent on releasing a video on how it can be potentially integrated into Slack as a communication channel?
Thanks for the kind words. I hadn’t thought of doing that, but it’s a cool idea, so I may do it after I finish my AWS/Terraform Playlist videos.
I hope this is what you were looking for: th-cam.com/video/fak-223hHTE/w-d-xo.html
@@cumuluscycles very much so, this was exactly what I had in mind. Awesome work and I was able to get mine working as well, thanks again!
@@tombo615 I'm glad to hear that!
at 24:08 why did it prompt jalapeño in the first place ??
it should have shown the valid options that align with best burger seller right?
does that mean the lambda logic is wrong?
Great video! I have one question. I do not want to use Lambda function by default for initialization and validation for all slots. I want to use it only for selected slots and more so to execute my business logic. Does Lex support this? Or is it either or. Either use Lambda function for all initialization, validation, fulfillment etc or use Lex for doing so? Thanks in advance,
WOOOOOOOOOOOOW
Can you please post exact node js code in git?
Can you once share the picture of visual builder which you discussed in video as it could clarify my doubts of message flow. Thanks in advance.
Hi! I no longer have this project provisioned. However, if you can tell me the time in the video you are referring to, I can check my unedited recording and see if I can get you the screenshot.
@@cumuluscycles I got the problem resolved thanks for the video and reply
Hi Rob. To gain an understanding of Lambda and Lex I am recreating your project word for word then will create my own version in the future. I have configured my lex bot and ensured all the settings are the same as yours. I copied the lambda function from your git and deployed it. All spellings of the slots match perfectly. When I build and test the bot, I get this response: "I'd like to order a burger." "Intent OrderBurger is fulfilled". I am unsure why this is happening. Any suggestions?
Sorry, but I’m not really sure. These issues are difficult for me to help troubleshoot, because I can’t see the code (and you indicated you’re using my code, and I didn’t experience that issue). If I get a chance, I’ll try and see if I can recreate the issue. If you figure it out before then, please post a reply here in the event anyone else runs into the same problem.
Can I use GUI settings instead of lambda function to over write the slot value when the user says no when the confirmation prompt confirms the user input with NO. For example - "You entered {lastfourdigits} as your last four digits of your credit card. Is this information correct?". After the user says no, I can't override the value of the GUI settings. Is it not possible?
I haven't had a chance to test this out yet, but check the following doc as it looks like it may provide some guidance: docs.aws.amazon.com/lexv2/latest/dg/paths-setting-values.html
Hi
The latest V2 we can't connect the lambda function, how did you pull it off in the GUI?
great playlist sir, thanks for all the hard work. i got an issue with the lambda code though. wasn't able to have mine work. here is the log error i got:
[ERROR] KeyError: 'bot'
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 94, in lambda_handler
bot = event['bot']['name']
i copied the code exactly from the repo link you provided and wasn't able to get it work.
after adding the lambda function to lex bot, here is what the bot says whenever i type 'I'd like to order a burger'
''Invalid Bot Configuration: No usable messages given the current slot, sessionAttribute, and requestAttribute set.''
I’m really not sure what’s causing that error. It may not be the actual code, but your configuration in Lex. You may want to double-check the steps in Lex. Sorry I don’t have better guidance. If you do figure it out, could you please post here in the event others have this issue?
@@cumuluscycles i actually did double-check the Lex configuration with your tutorial as guidance ad it seemed okay but imma do that again now and if i figure it out, imma post the troubleshoot right here too. thanks for your respond sir, i really do appreciate.
@@cumuluscycles Hi there, i got the code perfectly now. actually the issue was because i tried beautifying the bot configuration during building and i figured it out that the lambda might have not work because my slots didn't have exact names as those written in the python code. so i modified all the names identically to those in the code and the function did recognize them. so the take is, what ever modifications you made in your bot, make sure to modify the names in the lambda code too.