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 Dimension! Integrating Dimension 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 Dimension via Pip

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

pip install dimensionlabs

Add Dimension to your endpoints.yml

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

event_broker:
    type: dimension.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: .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 Dimension via Pip

pip install dimension

Include Dimension

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 dimension import rasa

Consume events with Dimension

Then, use our library to publish events as part of your consumer code. As suggested below, call the Dimension 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 Dimension 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 Dimension 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)