Helper Packages and Scripts
#
Intro and Walkthrough of HumanFirst Package module#
Conversion of Conversations in CSV to HumanFirst JSON Using Academy Script#
Acquiring and Running loading script examplesWe provide a humanfirst module which represents the objects in the HumanFirst JSON and HumanFirst APIs and examples of scripts to load data to HumanFirst in various ways.
- Examples scripts are provided for running a python conversion of popular formats into the humanfirst json
- They are kept in this repository https://github.com/zia-ai/academy
- It provides an ubuntu:focal based dockerfile to run the scripts
- They should run fine on a linux python3 environment
- If you are a MacOS user, it has been reported that you can run the scripts directly but we do not support it.
- We have made scripts run on Windows for clients but you will need to adjust the commands suitably for path names, ENV variables and other such windows things
- Using the dockerfile and mounting your windows directory is much easier
- For instructions see the README and the licence is in the repository.
- If you are not using the academy docker container then make sure to install the libraries required to run the academy scripts
#
General usageThe example conversation used for this demonstration can be found here. It is in the CSV format. It has the following columns in them - convoid, conv_created_at, utterance, speaker, confidence_score, intent, fallback_indicator, escalation_indicator. We are limiting with these columns for demonstration purposes. You can have as many columns as you want and include them as metadata.
Following is the python command for the convertion of CSV file containing conversations into the HumanFirst JSON format
Make sure your python venv setup, and then run the csv_to_json_unlabelled script.
Produces the conversations in HumanFirst JSON format.