/rasahub

Rasahub connects Rasa_core to Humhub Mail.

Primary LanguagePythonMIT LicenseMIT

Rasahub

https://travis-ci.org/frommie/rasahub.svg?branch=master

Rasahub provides an message interface to connect user interfaces with chatbots and several, data-providing services. Therefore it uses a plugin model.

Currently there are following plugins available:

These plugins are available as source and also as pypi packages:

  • Rasahub: pip install rasahub
  • Rasahub-Rasa: pip install rasahub-rasa
  • Rasahub-Humhub: pip install rasahub-humhub
  • Rasahub-Google-Calendar: pip install rasahub-google-calendar
  • Rasahub-Debug: pip install rasahub-debug
  • Rasahub-Debug-Client: pip install rasahub-debug-client

Feel free to develop your own plugin!

Please read the Documentation .


Prerequisites

  • Python installed

Installation

Pypi package

Install via pip:

pip install rasahub

Usage

Create configuration

You can use the built-in configuration creation tool. Be sure to install your desired plugins before running the tool, for example rasahub_humhub and rasahub_rasa. Afterwards you can call the tool like follows:

python3 -m rasahub.config -p rasahub_humhub rasahub_rasa -o config2.yml
Parameter Description Required
-p Lists all plugins required
-o sets the output config file path and name required

Manually create configuration

Create file config.yml in working path. Example:

rasa:
  package: 'rasahub_rasa'
  classname: 'RasaConnector'
  out: 'humhub'
  type: 'interpreter'
  init:
    host: '127.0.0.1'
    port: 5020

humhub:
  package: 'rasahub_humhub'
  classname: 'HumhubConnector'
  out: 'rasa'
  type: 'interface'
  init:
    host: '127.0.0.1'
    port: 3306
    dbname: 'humhub'
    dbuser: 'humhubuser'
    dbpasswd: 'humhub123'
    trigger: '!bot'

Command-Line API

Start rasahub:

python -m rasahub -c config.yml
Parameter Description Required Default
-c Path to configuration file optional config.yml

Testing

Prerequisites:

  • testing dependencies installed: pip install .[test]

Run Test:

python -m pytest tests/
  • License: MIT
  • PyPi - package installation