Hey @ojas, I think your use case could be covered nicely by using buttons. If you don’t want the user to press buttons and really have them write only numbers, then that could be done too (in that case, you’ll have to create a custom action for this). Let me know if you have more specific questions.
Since i need to create this bot for whatsapp, so buttons can’t be used. I have multiple user stories that i have to implement on whatsapp.
Since user interaction can will only be done through numbers i.e. 1,2,… . So how can intent parsing be done and implemented.
I think you’ll want to group all those numerical user messages under 1 intent; possibly extracting the number itself as an entity, and then from within your custom action conditioning on the value of the extracted entity.
@ojas I am also working on a similar kind of project, Is it working fine for you? Will it work if I start the conversation with the bot instead of passing numeric input?
Yes @Nik720, it is working fine for me. It depends on you how you start the conversation and pass the payload accordingly.
Since I have already defined all my intents in rasa, I am using flask only for mapping the Number(1,2,3…) correctly to the payload.
It’s like:
1: Topic 1
2: Topic 2
So, my flask would handle that on receiving ‘1’ as input what message or payload will it send to rasa. Something like : {sender: user1, message: topic_1}. Here ‘topic_1’ is the intent examples on which i have trained my model.
Hi @ojas I had some questions about the flask layer, would solve a ton of problems for me personally. Is there anyway I can get in touch with you, via discord or anything else? It would be extremely helpful.
Hello everyone Based on the @SamS proposal, I’ve made a small example bot that I hope will help you solve this challenge Let me know if it was useful to you. Link to the repository.
I’ve checked your project on Rasa Whatsapp bot. One thing, I didnt understand is when you type Hello!, it replied with a numbered chat and later you selected 1 and it replied about PyTorch. But it also works without saying Hello!, you can directly enter the number.
How can I get into a continuous response till that branch is closed. For example, I said Hello and I chose option1, later under that few more options will be displayed. And I’ll select that…this leads to a branch…
You’re right, it also works when you put a number directly without going through Hello. On the other hand, it would be random since the user is not supposed to know the options available at the start of the conversation. The greeting message thus makes it possible to display the supported menu.
Ow, interesting. Do you mean taking into account submenus and where an option will depend on the submenu in question !?
I have implemented single-level management. For example, if you select PyTorch (option 1), it displays a sub-menu with the version choice. From there, you can make your choice (always with numbers) and it directs you to the corresponding branch.