Rasa is a tool for creating AI-powered chatbots. Analyzing chatbot interaction logs and implementation challenges can yield insights for optimizing chatbot functionalities and user experiences.

Welcome to the Rasa documentation for Dashbot! Integrating Dashbot into your Rasa application is quick and easy.

If you have any questions, comments, or suggestions, please feel free to contact us.

Integration Options

Rasa Integration using Endpoints.yml

This integration path only works if you have no event broker set up with Rasa. If you do have an event broker, please look at integrating Rasa via an event broker.

Create a bot API key

Each bot needs its own API key for tracking.

Create a bot to get an API key. Make sure to choose Rasa as the platform.

Install Dashbot via Pip

If you have an python environment through virtualenv or anaconda (recommended) install pip, and then use the environment’s pip to install Dashbot:

pip install dashbot

Add Dashbot to your endpoints.yml

Add a line to your endpoints.yml so that rasa-core is configured to send events to Dashbot:

event_broker:
    type: dashbot.rasa.rasa
    apiKey: YOUR_API_KEY

Additional Configurations

Adding PII Redaction

After you follow the instructions here, in order to enable the PII redaction package, you will need to add the redact field to your endpoints.yml as done below:

event_broker:
    type: dashbot.rasa.rasa
    apiKey: YOUR_API_KEY
    config:
        redact: true


Rasa Integration via an Event Broker

Create a bot API key

Each bot needs its own API key for tracking.

Create a bot to get an API key. Make sure to choose Rasa as the platform.

Install Dashbot via Pip

pip install dashbot

Include Dashbot

Use the API key created above.

Rasa Event Brokers api produces a message onto a message broker, which is then used to consume the event. In the message broker consumer code, import our python library:

from dashbot import rasa

Consume events with Dashbot

Then, use our library to publish events as part of your consumer code. As suggested below, call the dashbot rasa code with your api key in place of API_KEY_HERE. The example code below is for consuming rabbitmq messages via pika.

def _callback(ch, method, properties, body):
    event = json.loads(body)
    db = rasa.rasa(API_KEY_HERE)
    db.publish(event)

Additional Configurations

Adding PII Redaction

Please read the installation steps for the dashbot package and the PII redaction package on this page before you continue. If you would like to use the rules-based PII redaction capabilities offered by the open source package, please call the method in our dashbot package with the redact parameter, as demonstrated in the example code below, which uses rabbitmq as the message broker and the pika rabbitmq client library.

def _callback(ch, method, properties, body):
    event = json.loads(body)
    db = rasa.rasa(API_KEY_HERE, redact=True)
    db.publish(event)


PII Redaction

Redaction for the Python SDK of dashbot is minimally supported. Redaction will only work for the Rasa platform, and requires some additional configurations including installing a branch of our library and a forked version of Scrubadub.

Install dashbotpy branch

pip install git+https://github.com/actionably/dashbotpy.git@redact

Install scrubadub fork

We install a forked version of the scrubadub library available here.

pip install git+https://github.com/CrisisTextLine/scrubadub.git

Consume events with Dashbot

Once you have finished installation of the dashbot library and the scrubadub library to your environment, please configure Rasa with dashbot via one of the following methods (skipping the steps to install dashbotpy):