How to use an intent to capture random sentence

For example, the bot asks a user: “What’s your favorite thing to do?” The user may come back with anything: “I like to watch movie”, “Hiking”, … How do I create an intent to capture the answer? I cannot use form by the way.

Well, you could write an action and a policy, that pretty much mimic a form. Question is, why not use the form in the first place.

You could also grab the message from the tracker.events afterwards, seems a bit ugly but might do the job. Just need to make sure that action get’s triggered.

Thank you for your answer! However, Form is not the solution to me. For example, Rasa’s formbot example (rasa/examples/formbot at master · RasaHQ/rasa · GitHub), one of the questions is “Which cuisine?” My answer could be anything – Chinese, Italian, or Asian fusion food, Japanese noodle, etc. However, the bot only understand the terms pre-trained.

My use case is to use bot to help users to leave a message for others. For example, the bot would ask: “What’s your message for your son?” The user could say anything – I can’t pre-train it at all. How do I handle this case?

That can also be handled by a FormAction. There’s a specific slot mapping (‘from_text’) for this, which takes the whole message as the slot value. You may even process it in the validate_{slot_name} function.

I see. That’s exactly what I need. Thanks!