So what I want is to just accept this data just like normal application without doing anything. just wanna grab data it can be anything. So is there any way to achieve this.
Because I have used forms and inside form flow it don’t go to another flow even if we enter data of another intent that is outside form flow that is perfectly fine. But in form when I give any random data it show me default action instead of that it should grab that data in that particular slot so that I can validate it further in forms validate methods.
You can use from_text to extract any type of input given by the user. Inside your form you could do something like this:
def slot_mappings(self):
# type: () -> Dict[Text: Union[Dict, List[Dict]]]
"""A dictionary to map required slots to
- an extracted entity
- intent: value pairs
- a whole message
or a list of them, where a first match will be picked"""
return { "name": [self.from_text()] }
This way your slot will be filled with any string given by the user.
Is there any way that I can extract entity as well from user message. Currently what is happening is:
If user types anything, bot is setting slot accordingly with whole string.
But what if user giving his name like “my name is alex”. So it should be able to extract “alex” only but now it’s getting whole message inside slot i.e “my name is alex”. So how do I achieve this???