How to send an attachment via dispatcher?

@Sherin-Sneha What attachment you looking at text, video, button, image etc

Text:

`dispatcher.utter_message(text="Hello 😀")`

Image:

dispatcher.utter_message(text="Here is something to cheer you up 😉", image="https://i.imgur.com/nGF1K8f.jpg")

Button:

   button_resp=[
                  {
                      "title": "great",
                      "payload": "great"
                  },
                  {
                      "title": "super sad",
                      "payload": "super sad"
                  }
              ]

   dispatcher.utter_message(text="Hey! How are you?", buttons=button_resp)

Video:

msg = { "type": "video", "payload": { "title": "Rasa 14 Series Premier Video", "src": "https://youtu.be/Ap62n_YAVZ8" } }

dispatcher.utter_message(text="Check this video",attachment=msg)

Hope this what you looking and solve you issue.

1 Like