• This repository has been archived on 15/Jul/2021
  • Stars
    star
    307
  • Rank 136,109 (Top 3 %)
  • Language
    JavaScript
  • License
    GNU Affero Genera...
  • Created over 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

React-based Chatroom Component for Rasa Stack

React-based Chatroom Component for Rasa Stack

CircleCI

Demo

Note: This project is not maintained anymore. If you like to become a community maintainer get in touch with @hotzenklotz. It may still work for your project or serve as a point of reference for others.

Watch a demo of our Chatroom in action

Features

  • React-based component
  • Supports Text with Markdown formatting, Images, and Buttons
  • Customizable with SASS variables
  • Generates a unique session id and keeps it in sessionStorage
  • Queues consecutive bot messages for better readability
  • Speech input (only in Chrome for now)
  • Text to Speech (only in Chrome for now)
  • Demo mode included (ideal for scripted screencasts)
  • Hosted on S3 for easy use
  • Simple setup. Works with Rasa's REST channel

Usage

  1. Embed the chatroom.js in the HTML of your website and configure it to connect to your Rasa bot. Either use the S3 hosted version or build it yourself. (see below)
<head>
  <link rel="stylesheet" href="https://npm-scalableminds.s3.eu-central-1.amazonaws.com/@scalableminds/chatroom@master/dist/Chatroom.css" />
</head>
<body>
  <div class="chat-container"></div>

  <script src="https://npm-scalableminds.s3.eu-central-1.amazonaws.com/@scalableminds/chatroom@master/dist/Chatroom.js"/></script>
  <script type="text/javascript">
    var chatroom = new window.Chatroom({
      host: "http://localhost:5005",
      title: "Chat with Mike",
      container: document.querySelector(".chat-container"),
      welcomeMessage: "Hi, I am Mike. How may I help you?",
      speechRecognition: "en-US",
      voiceLang: "en-US"
    });
    chatroom.openChat();
  </script>
</body>
  1. In your Rasa bot setup, make sure to include the Rasa REST channel in your credentials.yml file:
rest:
  # pass

Restart your Rasa server. Depending on your setup you might need to add CORS headers, e.g. --cors "*".

rasa run --credentials ./credentials.yml  --enable-api --auth-token XYZ123 --model ./models --endpoints ./endpoints.yml --cors "*"

Note, the version of the Chatroom's Javascript file is encoded in the URL. chatroom@master is always the latest version from the GitHub master branch. Use e.g. [email protected] to load a specific release. All Releases can be found here.

Chatroom Version Compatible Rasa Core Version
0.10.x 1.0 - 2.x
0.9.x (Deprecated) 0.11.4+, 0.13.7
0.8.x (Deprecated) 0.11.4+
0.7.8 (Deprecated) 0.10.4+

Note, versions prior to 0.10.x used a custom Python channel to connect the chatroom frontend with a Rasa bot backend. Upgrading, from version 0.9.x or below will require you to modify the credentials.yml and include the Rasa REST channel. (see installation instructions above)

Development

Install dependencies

yarn install

Continuously build the Chatroom component

yarn watch
yarn serve

Open http://localhost:8080/demo.html in your browser.

Build

yarn build

Distributable files will be created in folder dist.

License

AGPL v3

Made by scalable minds

More Repositories

1

amd-optimize

An AMD (RequireJS) optimizer that's stream-friendly. Made for gulp.
CoffeeScript
163
star
2

webknossos

Visualize, share and annotate your large 3D images online
TypeScript
124
star
3

gulp-gm

Image manipulation with gm
JavaScript
25
star
4

localcast

Stream your local media to Chromecast
CoffeeScript
24
star
5

invoice-compiler

Generate invoices from YAML files using puppeteer.
HTML
22
star
6

webknossos-libs

Python API and CLI tools for working with WEBKNOSSOS datasets, annotations and server interactions. Includes converter to OME-Zarr.
Python
22
star
7

play-mongev

An evolution plugin for playframework 2 applications using MongoDB
Scala
19
star
8

zarrita

Python
18
star
9

fossildb

Versioned Key-Value Store with RocksDB backend and gRPC API
Scala
13
star
10

time-tracker

Time Tracking for Github issues.
CoffeeScript
13
star
11

sbt-play-raml

Scala
13
star
12

webknossos-wrap

Efficient 3D volume storage format for webKnossos and analyses
Rust
8
star
13

pixijsutil

Pixi.js Scaling Utilities
JavaScript
4
star
14

salt-event-hub

A REST server for firing salt events
Python
4
star
15

cluster_tools

Task distribution with Slurm and multi-processing for Python
Python
3
star
16

toggl-export

Exports toggl.com time entries to scalableminds time tracker.
JavaScript
2
star
17

nojekyll

Static site generator for node.js. Inspired by Jekyll.
CoffeeScript
2
star
18

require-sugar

Syntactic sugar for defining AMD modules
JavaScript
1
star
19

boot

Templates for creating new projects
JavaScript
1
star
20

hubot

CoffeeScript
1
star
21

dockerfiles

Docker images used within scalableminds 🐳
Dockerfile
1
star
22

stroke-lesion-segmentation

Supplementary materials for the publication "Deep learning-based automated lesion segmentation on mouse stroke magnetic resonance images"
Jupyter Notebook
1
star
23

nml-spec

Formal specification of NML files
1
star
24

coffeelint-min-colon-spacing

Validate a minimum spacing left and right of a colon assignment
CoffeeScript
1
star
25

maintenance

Simple maintenance website
HTML
1
star
26

fivepad

A synching notepad with exactly 5 panels.
Java
1
star
27

metal-common

A bunch of custom metalsmith plugins for static site generators
JavaScript
1
star
28

util-fox

Helper to deal with nested Box, Option and Future types
Scala
1
star
29

fluent-canvas

Chainable syntax for HTML5 Canvas. For readable barebone Canvas drawing.
CoffeeScript
1
star