Displaying Video in the Rasa Webchat

I will check get back to you

Yeah sure…

Thanks in advance :slight_smile:

Hello @vaidehi16,

i m not having any issue with rasa webchat widget.

Here is an screenshot :

Are you trying to load it in rasa x. Because rasa x doesn’t supports videos but Botfront widget supports.

I am not using rasa x…

Also I am using REST channel.


Is this a custom widget?


GitHub - scalableminds/chatroom: React-based Chatroom Component for Rasa Stack used this… And also another script.js for custom requirements…

I m not sure but i think your widget doesn’t support reach media like cards, videos audios. Can you try this widget instead GitHub - botfront/rasa-webchat: A feature-rich chat widget for Rasa and Botfront

if i do that everything has to be done from the beginning right ?

No you just need to create a html file with following code :

<div id="webchat"></div>
<script src="https://cdn.jsdelivr.net/npm/rasa-webchat@0.11.5/lib/index.min.js"></script>
    selector: "#webchat",
    initPayload: "/get_started",
    customData: {"language": "en"}, // arbitrary custom data. Stay minimal as this will be added to the socket
    socketUrl: "http://localhost:5005",
    socketPath: "/socket.io/",
    title: "Title",
    subtitle: "Subtitle",
    params: {"storage": "session"} // can be set to "local"  or "session". details in storage section.

Save it as index.html

Then run the command in terminal :

rasa run -m models --enable-api --cors "*" --debug

Your local host will be served by default on Port 5005.

After that you just need to open index.html in a browser. A widget icon will appear. send a /restart before starting the conversation. Then go on with you story flow.

Note: in case your local host is server on different port you need to update the port. and since you are using rest already i assume you have added socket.io in the credentials file. If not please add the following and retrain the bot then run step 2 before testing the bot in widget.

Code for Socket.io :

  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: true
1 Like

yeah I’ve done entire same process previously with different index.html…

Okay, will try & use this widget…

Thank you !

I’ve tried using socket io & it worked…

But is there any way when i don’t wanna use socket.io??

You can use http api to do so but it wont play the video/audio from localhost. To play it you can host it on server and play the link to it.

@JiteshGaikwad Hi jitesh, YamlValidationException: Failed to validate ‘C:\Users\m\Desktop\MovieBot\domain.yml’. Please make sure the file is correct and all mandatory parameters are specified. Here are the errors found during validation: in C:\Users\m\Desktop\MovieBot\domain.yml:23: Key ‘attachment’ was not defined. Path: ‘/responses/utter_greet1/0’

I am getting this error if used in domain.yml file

If I did using custom actions didn’t get any error but as well didn’t get any video response on chat UI. please help me on that.

@mounika2 can you tell me which version of Rasa are you using.

@JiteshGaikwad I am using rasa 2.0 version, and I fix that issue, thanks.

hi @JiteshGaikwad but I am facing issues in custom payload quick replies, I am using bot UI what you provided.


- custom:




          - content_type: "text"

            title: "button 1"

            payload: "/payload1"

          - content_type: "text"

            title: "button 2"

            payload: "/payload2"

this is my custom payload, I didn’t get any error but I am not able to get quick replies in UI

hi @mounika2, how are you able to use quick replies and videos in Rasa 2.0. Can you provide sample domain file.

1 Like