Enter name and reply back with Greeting and name - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum

👋 Introducing the Rasa Playground

Enter name and reply back with Greeting and name

post by sumit2498 on Sep 22, 2020

I want user to enter name and bot should reply with his name and Greet! How to do that

post by gaushh on Sep 22, 2020

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:

post by sumit2498 on Sep 22, 2020

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

post by gaushh on Sep 22, 2020

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 tables lookup tables.

Please mark this answer as the solution for others’ reference if you found it helpful.

post by sumit2498 on Sep 23, 2020

I dont know how to mark it as a solution but I have shared a link with my teammates for this ans… Thanks

post by gaushh on Sep 23, 2020

@sumit2498 Glad I could help. You’ll find the solution button on the left of the like button under my answer.