Skip to content

Commit 63e9a68

Browse files
authored
Update Rasa Chat Widget documentation and links
this snippet i took from rasa pro documentation, and it works perferctly fine on rasa open source
1 parent 60a3cff commit 63e9a68

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

docs/docs/connectors/your-own-website.mdx

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,33 @@ as a JSON object under the key `token`:
171171

172172
### Chat Widget
173173

174-
Once you've set up your SocketIO channel, you can use the official Rasa Chat Widget on any webpage.
175-
Just paste the following into your site HTML and paste the URL of your Rasa instance into
176-
the `data-websocket-url` attribute
174+
Once you've set up your SocketIO channel, you can use the [official Rasa Chat Widget](https://github.com/RasaHQ/chat-widget) on any webpage. Use the example HTML below and paste the URL of your Rasa instance into the `server-url` attribute:
177175

178176
```html
179-
<div id="rasa-chat-widget" data-websocket-url="https://your-rasa-url-here/"></div>
180-
<script src="https://unpkg.com/@rasahq/rasa-chat" type="application/javascript"></script>
177+
<!doctype html>
178+
<html lang="en">
179+
<head>
180+
<meta charset="UTF-8" />
181+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
182+
<title>HTML Example</title>
183+
<script
184+
type="module"
185+
src="https://unpkg.com/@rasahq/chat-widget-ui/dist/rasa-chatwidget/rasa-chatwidget.esm.js"
186+
></script>
187+
<link
188+
rel="stylesheet"
189+
href="https://unpkg.com/@rasahq/chat-widget-ui/dist/rasa-chatwidget/rasa-chatwidget.css"
190+
/>
191+
</head>
192+
<body>
193+
<rasa-chatbot-widget server-url="https://example.com"></rasa-chatbot-widget>
194+
</body>
195+
</html>
181196
```
182197

183-
For more information, including how to fully customize the widget for your website, you can check out the [full documentation](https://chat-widget-docs.rasa.com/).
198+
For more information, including how to fully customize the widget for your website, you can check out the [full documentation](https://chatwidget.rasa.com/).
184199

185-
Alternatively, if you want to embed the widget in a React app, there is
186-
[a library in the NPM package repository](https://www.npmjs.com/package/@rasahq/rasa-chat).
200+
Alternatively, if you want to embed the widget in a React app, there is [a library in the NPM package repository](https://www.npmjs.com/package/@rasahq/chat-widget-react).
201+
202+
:::note Deprecated Chat Widget
203+
For information on the deprecated chat widget, [rasa-chat](https://www.npmjs.com/package/@rasahq/rasa-chat), documentation can be found [here](https://chat-widget-docs.rasa.com/).:::

0 commit comments

Comments
 (0)