How to place a video in Rasa Chatbot

I tried many ways but I’m not getting the video in Rasa Chat. How to write custom function to display video in rasa chatbot.

I guess it depends of your frontend. If it supports markdown, you probably can use the markdown syntax.

1 Like

@n2718281 Can I have code so that I may get some Idea how should I write.

Something like that

[![Image legend](http://img.youtube.com/vi/rlAQWbhwqLA/0.jpg)](http://www.youtube.com/watch?v=rlAQWbhwqLA)

or like that if you use GitHub - botfront/rasa-webchat: A chat widget for Rasa and Botfront

attachment: 
 type: video
 payload: 
  title: "Link name"
  src: "https://www.youtube.com/watch?v=f3EbDbm8XqY"
1 Like

where should I insert this code?

In the responses part of domain.yml (if I understood correctly what you wanted to do)

1 Like

when I placed code:

utter_video:
    attachment:
      type: video
      payload:
        title: "Link name"
        src: "https://www.youtube.com/watch?v=f3EbDbm8XqY"

I got this error:

FutureWarning: Templates should not be strings anymore. Utterance template 'utter_features' should contain either a '- text: ' or a '- custom: ' attribute to be a proper template.
  utter_templates = cls.collect_templates(data.get("responses", {}))

You need to add that just before attachment if I remember correctly:

- custom:
1 Like