angular-chat-widget-rasa
Version:
A chatbot widget that is able to connect to a rasa chatbot using SocketIO
49 lines (33 loc) • 1.66 kB
Markdown
# Angular Chat Widget Rasa
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.

## Prerequesites
A [Rasa](https://rasa.com/) bot exposed with the SocketIO protocol : [See instructions in the Rasa Core Documentation](https://rasa.com/docs/core/connectors/#socketio-connector).
Session persitence is not supported yet and should be set to false.
## Installation
Install `angular-chat-widget-rasa` from `npm`
```bash
npm i angular-chat-widget-rasa --save
```
Add the package to your module
```
import { ChatbotRasaModule } from 'angular-chat-widget-rasa';
@NgModule({
imports: [ChatbotRasaModule]
})
```
## Usage
Add the component to your page
```
<chat-widget botName="MyBot" url="http://localhost:5002" ></chat-widget>
```
Inputs :
|Name|Type|Default|Description|
|:---:|:---:|:---:|:---:|
| theme | blue, grey or red | blue | The theme of the widget |
| botName | string | Bot | The name of the bot to display |
| botAvatar | url or path |  | The avatar of the bot |
| userAvatar | url or path |  | The avatar of the user |
| url | url | http://localhost:5002 | The url to connect to the Rasa bot |
| startingMessage | string | Hi, how can we help you? | The message to display when the chat is open |
| opened | boolean | true | Set to true to open automaticaly when on the page or false to wait for a click |