JustinaPetr / Weatherbot_Tutorial

275 stars 449 forks source link

interactive components #66

Open asyaFaiz opened 5 years ago

asyaFaiz commented 5 years ago

Hey, This bot basically talks using only text right? I wanted to add interactive components as well. I wa sable to add buttons and write actions based on button responses. But I could not find how to integrate dialogues and message menus of slack using rasa domain or custom actions. @JustinaPetr Could you please help me with this?

asyaFaiz commented 5 years ago

@JustinaPetr Hy, Can you atleast tell me if it is possible or not to display message menus and dialogs in slack using rasa? If not, what could be an alternative to drop down menus for a bot using rasa?

Please! I am stuck at this point.... please

JustinaPetr commented 5 years ago

Hello @asyaFaiz. In this example, the bot is only using text inputs/outputs. I am not sure if I understand what do you mean with displaying dialogs?

As of buttons and drop down menus - yes, it is definitely possible to display them, though I don't think this functionality is included in the current version of the Slack connector to Rasa. As I understand you managed to have buttons working. For drop-down menus you may need to modify the send_text_with_buttons function here to send the payload which would display a dropdown instead of the buttons (based on the payload examples here). Give it a go and let me know if you need more help with implementing this

asyaFaiz commented 5 years ago

@JustinaPetr Thank you for responding! :smile:

Can you tell me from where is send_text_with_buttons called? If I modify the function.. wouldn't it effect the way the buttons will be displayed?

asyaFaiz commented 5 years ago

@JustinaPetr I was able to display menus using the dispatcher.utter_attachment. But I dont know how to handle when different options in the menu is selected.