angular-chat-widget-rasa

A chatbot widget that is able to connect to a rasa chatbot using SocketIO

Usage no npm install needed!

<script type="module">
  import angularChatWidgetRasa from 'https://cdn.skypack.dev/angular-chat-widget-rasa';
</script>

README

Angular Chat Widget Rasa

This library was generated with Angular CLI version 7.2.0.

Prerequesites

A Rasa bot exposed with the SocketIO protocol : See instructions in the Rasa Core Documentation.

Session persitence is not supported yet and should be set to false.

Installation

Install angular-chat-widget-rasa from npm

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