Vincent
Vincent

Reputation: 161

Rasa chatbot : Retrieving conversation data

I am trying to build a chatbot using RASA. For now, I am running my chatbot locally on a Ubuntu shell. I'd like to be able to retrieve my conversation data ; from RASA's documentation, it seems to be possible, but the documentation only addresses the case when the bot is running on a http server : link

Upvotes: 5

Views: 4137

Answers (1)

Tobias
Tobias

Reputation: 1910

You can add a Mongo or Redis tracker store which stores all the conversations data in a database. Do so by adding a section like this to your endpoint configuration:

tracker_store:
    store_type: mongod
    url: <url to your mongo instance, e.g. mongodb://localhost:27017>
    db: <name of the db within your mongo instance, e.g. rasa>
    username: <username used for authentication>
    password: <password used for authentication>

Then specify this file with --endpoints when you run Rasa Core, e.g.

python -m rasa_core.run -d models --endpoints endpoints.yml

The alternative would be to run Rasa Core with the exposed Rest API, e.g.

python -m rasa_core.run -d models --enable-api

Then you can access the conversations with HTTP requests as documented here, e.g.:

curl --request GET \
  --url http://localhost:5005/conversations/<sender_id>/tracker

Upvotes: 4

Related Questions