Rasa Webchat Widget
This is the official widget to use with your Rasa bot! Note: this is a very early pre-release.
Embedding the widget on your page
Just paste the following into your site HTML, putting the URL of your Rasa instance in the data-websocket-url
attribute
<div id="rasa-webchat-widget" data-websocket-url="https://your-rasa-url-here/"></div>
<script src="https://unpkg.com/@rasahq/rasa-webchat" type="application/javascript"></script>
Using the widget in a React project
Install the dependency
# if you use node
npm install @rasahq/rasa-webchat
# if you use yarn
yarn add @rasahq/rasa-webchat
Make sure you pay attention to the peerDependencies
and address any that your project is missing.
Then you can use the component like so
import { Webchat } from '@rasahq/rasa-webchat';
export default function MyApp() {
return (
<Webchat websocketUrl="https://your-rasa-url-here/" />
);
}