KMI-KPZ / rasahub

Rasahub is a middleware to connect Chatbots to User Interfaces like Enterprise Social Networks and include data-sources like Google Calendar.
MIT License
5 stars 5 forks source link

======= Rasahub

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

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:

Feel free to develop your own plugin!

Please read the Documentation_ .


Prerequisites

Installation

Pypi package

Install via pip:

.. code-block:: bash

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:

.. code-block:: bash

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:

.. code-block:: yaml

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:

.. code-block:: bash

python -m rasahub -c config.yml

+------------+------------------------------+-----------+------------+ | Parameter | Description | Required | Default | +============+==============================+===========+============+ | -c | Path to configuration file | optional | config.yml | +------------+------------------------------+-----------+------------+

Testing

Prerequisites:

Run Test:

.. code-block:: python

python -m pytest tests/

.. _Rasahub-Rasa: https://github.com/frommie/rasahub-rasa .. _Rasahub-Humhub: https://github.com/frommie/rasahub-humhub .. _Rasahub-Google-Calendar: https://github.com/frommie/rasahub-google-calendar .. _Rasahub-Debug: https://github.com/frommie/rasahub-debug .. _Rasahub-Debug-Client: https://github.com/frommie/rasahub-debug-client .. _Rasa_Core: https://github.com/RasaHQ/rasa_core .. _Humhub: https://www.humhub.org/de/site/index .. _Mail: https://github.com/humhub/humhub-modules-mail .. _PyPi: https://pypi.python.org/pypi/rasahub .. _Documentation: https://rasahub.readthedocs.io