Reputation: 161
How best to create my story to process inputs for the sequence:
How do I process the input without setting a pattern like "My name is Tom" but being able to process "Tom" as a username
Working with rasa-core and rasa-nlu on my local machine running python.
Upvotes: 1
Views: 2154
Reputation: 6592
Update Rasa 2.2.9: in addition to what Tobias suggested, you also need to edit domain.yml and add the following lines:
slots:
name:
type: text
initial_value: "human"
entities:
- name
Upvotes: 0
Reputation: 1910
You can use define an intent inform
, which looks like that in your NLU training data (be sure to provide more examples (> 10) with names so that the entity recognition works reliable):
## intent:inform
- [Tom](name)
- [Lisa](name)
- It is [Tom](name)
- My name is [Bob](name)
and than have a story like:
## Ask name
* greet
- utter_greet
- utter_ask_name
* inform{"name": "A name"}
- action_save_name
Upvotes: 2