How to Build a Chatbot Using Amazon Lex, Lambda and the Python Requests Library
HTML-код
- Опубликовано: 11 окт 2024
- In this video, I show you you how to create a serverless chatbot using Lex Lambda and the Python requests libraru.
We will build a conversational experience.
Just like Siri, Google and Alexa can tell you joke or tell you a random fact, our bot will be able to do the same
What is Lex
Amazon Lex is a service for building conversational interfaces into any application using voice and text. Amazon Lex provides the advanced deep learning functionalities of automatic speech recognition (ASR) for converting speech to text, and natural language understanding (NLU) to recognize the intent of the text, to enable you to build applications with highly engaging user experiences and lifelike conversational interactions.
Documentation Link
docs.aws.amazo...
What is Lambda
AWS Lambda is a serverless compute service that lets you run code without provisioning or managing servers. (FaaS)
Documentation Link
docs.aws.amazo...
What is Python
Python is an interpreted high-level general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant indentation.
en.wikipedia.o...)
Lex is regional service. For details about regions supported, API endpoints etc. see the
Lex Reference Guide
docs.aws.amazo...
How to Give Lambda function access to the internet
aws.amazon.com...
How to create Lambda Layers
docs.aws.amazo...
Do you think it is a good idea to store URLs inside your Lambda functions? Consider using
Environment Variable
Secrets Manager
Systems Manager Parameter Store
Do you think it is a good idea to use a single Lambda function for everything? Split the jokes and factoid functions into separate Lambda functions.
Why would I now want to import the entire requests library? Only use the get function instead of doing a blanket import to save on cost.
Can you integrate a LOB system API call into your Lambda function? For example, design a bot that can give the user a status of their case. The bot asks the user for a case number (slot) and sends the information to Lambda and Lambda makes an API call to CRM system (Dynamics or Salesforce) and gets the case status
Git Repo for code
github.com/fak...
Creating and using Lambda Layers
docs.aws.amazo...
Terrific explanation on the Lex response and how to parse it and send a response back. Wow!
Thanks a lot sir. I have learnt many things. Hoping for some more like these in python. Thanks
This is absolutely awesome. I am going to do it right now. Would be great to see followup video on how to actually deploy this in production, for example on website or integrate with existing system, etc. - just to get a feel about real user experience
Try these 4 video part series. I go into a little more details
ruclips.net/video/KGPdETbxbFw/видео.html
This video is great! I am building a bot with Lex V2 and am trying to refactor the Lambda code from V1 (this video). I've checked the documentation and can't seem find out how to make it work. Would anyone perhaps have a copy of the updated Lambda code for Lex V2? Thanks!
Hi Faisal, your video is great, but it is in v1. Now I can't use v1 at all, so the tutorial is not working for me. I don't know why AWS made it harder in new version. I even can't find how to easily add Lambda function to bot.
Excellent. Thank you Faisal - you rule.
You are welcome
Great!!! Tutorial, has given me some insight, Thanks
You are welcome.
If I am using this inside an Amazon Connect Contact flow, How can I call and set the response Content inside the Set Contact Attribute block?
hey can we use bot in amazon chime for private message or is it we have to use bot in room (in case of amazon chime)
Dude... You rock!
Great Video! Can you help me understand what is the difference between the intent fulfillment states(Fulfilled, InProgress and ReadyForFulfillment) ? and in which case each is used?
docs.aws.amazon.com/lex/latest/dg/API_runtime_DialogAction.html
Good one ...
Great video! Thanks a lot
I want to call external api and provide the value as response, can you provide any documentation on that topic?
If you look at the code in the Git Repo, I am using the get method from the requests library to make a call to an external API. The API endpoint and response are handled in the Lambda.
@@FaisalAkhtar ohh sorry I hadn;t checked the rep yet. Thanks for the quick response
how do I change intent using lambda?
skipped the first 8 minutes of fluff... watched to 13:21 when he said we aren't going to do lambda functions... what is the point & how could you spend an hour on this?
27:00
@@FaisalAkhtar okay i'll delete my comment
just frustrated at the moment, its me not you
@@EzraSchroeder don't worry about it 🙂
@@FaisalAkhtar i wound up referring to this while completing a programming assignment for a masters degree... thanks for your understanding & sorry for being mister poopy pants
Facing an error
Invalid Lambda Response: Received error response from Lambda: Unhandled
Please help
Ensure you are using v1.
V2 response format is different
Check out my code and see if matches yours Feel free to use it to troubleshoot
github.com/fakhtar/JokesandFactsLexVideo
@@FaisalAkhtar AoA sir, I tried to troubleshoot, but I am receiving the same problem.
@@WarriorAjk Are you using Lex V1 or V2? My vide is in V1. Also, you can simply copy and paste my code into your Lambda. Have you tried doing that? If you still have the problem, post your Lambda code into a git repo and I will see what's wrong with it.
How to contact you sir?
I have added a business inquiries email in the about tab in my channel.
@@FaisalAkhtar sorry sir I didn't find it. Please give me your whats app number or email id.
@@gausshaikh2525 find me on LinkedIn
27:00