I want user to enter name and bot should reply with his name and Greet! How to do that
I am putting in sample code in respective files for you…
nlu.md
## intent:Intent_Name
- My name is [Rick] (user_name)
- My name is [Morty] (user_name)
- [Archer] (user_name) is my name
domain.yml
intents:
- Intent_Name
entities:
- user_name
responses:
utter_IntroductionIntent:
- text: Hi [user_name]. How can I help you?
stories.md
## Name_Response
* Intent_Name
- utter_IntroductionIntent:
but does this accept any name… which is not provided in the intent… because i am gathering name and email address from user… didn’t checked out yet Also do we need to specify anything in actions.py? BTW Thanks! for reply
The bot tries to identify entity on the basis of the entities specified in the nlu.md file (namely Archer, Rick and Morty in the above example) and the context in which those entities were written in (“My name is” and “is my name” in the above example). To make it full proof you can make an exhaustive list of all the possible names you’re expecting and put it in lookup tableslookup tables.
Please mark this answer as the solution for others’ reference if you found it helpful.
I dont know how to mark it as a solution but i have shared a link with my teammates for this ans… Thanks
@sumit2498 Glad I could help.
You’ll find the solution button on the left of the like button under my answer.