0.1.5 • Published 1 month ago

@rasahq/rasa-chat v0.1.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 month ago

Rasa Chat 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-chat-widget" data-websocket-url="https://your-rasa-url-here/"></div>
<script src="https://unpkg.com/@rasahq/rasa-chat" type="application/javascript"></script>

Using the widget in a React project

Install the dependency

# if you use node
npm install @rasahq/rasa-chat

# if you use yarn
yarn add @rasahq/rasa-chat

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 { ChatWidget } from '@rasahq/rasa-chat';

export  default function MyApp() {
    return (
        <ChatWidget websocketUrl="https://your-rasa-url-here/" />
    );
}