This article will help explain the process of importing your conversational data into HF from Rasa. If you haven’t already, read up on our Part 1 of this series where we explain how to import an existing project.
Before syncing data from Rasa, you will first need to install the necessary HumanFirst CLI tool. You can find detailed instructions here.
Rasa <> HumanFirst
hf allows conversations to be imported from the Tracker Store of an existing Rasa deployment. In order for this feature to work, a few dependencies and configuration are needed.
rasacommand needs to be accessible from your shell.
- The Rasa deployment needs to be configured and accessible for the machine running the command line tool. More precisely, you need a
endpoints.ymlfile with a properly configured tracker_store section.
- The python
rasapackage needs to be accessible when executing a python program in the current shell. This means that if Rasa got installed in a virtualenv, this virtual environment needs to be activated prior to executing the
Importing conversations from Rasa’s tracker into an existing workspace is as simple as executing:
$ hf rasa import-conversations — workspace playbook-QPGRXYTO45A4PLWNCNO6BJFC
in the directory in which the
endpoints.yml file is. It is also possible to specify the endpoints file from the command line:
$ hf rasa import-conversations — workspace playbook-QPGRXYTO45A4PLWNCNO6BJFC — endpoints /path/to/endpoints.yml
Working with conversations or utterances from sources other than Rasa
You may choose to import files using the command line tool in order to automate the synchronization with third party systems.
You can import conversations in CSV format with
hf conversation import — workspace [workspace id] ./conversations.csv
$ hf conversation import — workspace playbook-QPGRXYTO45A4PLWNCNO6BJFC ./conversations.csv conversations.csv: File uploaded successfully
You can import utterances the same way with
hf utterance import — workspace [workspace id] ./utterances.txt
$ hf utterance import — workspace playbook-QPGRXYTO45A4PLWNCNO6BJFC ./utterances.txt utterances.txt: File uploaded successfully