Hello, I have been trying to use carousels in one of my rasa bots, channeled to Facebook messenger, I have tried several ways but couldn’t make it work. This is what I get:
Here is my actions.py:
class ActionCarousel(Action):
def name(self) -> Text:
return "action_products_carousels"
def run(self, dispatcher, tracker: Tracker, domain: "DomainDict") -> List[Dict[Text, Any]]:
message = {
"type": "template",
"payload": {
"template_type": "generic",
"elements": [
{
"title": "Welcome!",
"image_url": "https://petersfancybrownhats.com/company_image.png",
"subtitle": "We have the right hat for everyone.",
"default_action": {
"type": "web_url",
"url": "https://petersfancybrownhats.com/view?item=103",
"webview_height_ratio": "tall",
},
"buttons": [
{
"type": "web_url",
"url": "https://petersfancybrownhats.com",
"title": "View Website"
}, {
"type": "postback",
"title": "Start Chatting",
"payload": "DEVELOPER_DEFINED_PAYLOAD"
}
]
}
]
}
}
dispatcher.utter_message(attachment=message)
return []