Workshop Preparations

Welcome to the Workshop Preparations Page

There are some preparations you will need to make before attending the workshop. All preparations are free of charge and do not require programming knowledge. They include: 1) Sign up for an OpenAI account 2) Install Homebrew (Mac Only) and Python on your machine 3) Install the OpenAI library 4) Download your social media data (of your choosing! This can be Twitter, Facebook, or Instagram ) 5) Format your data using the provided CSV template. Please note that all prompts and completions should be in English. 6) Download and put your CSV in a folder labeled “bot” on your desktop. We will show you videos of how to go through each step below. Note: some steps have instructions for Mac and Windows as these differ. Follow the instructions for your machine. If you have any issues or questions about these preparations, please email MirabelleJones@Gmail.com and nastasia.griffioen@gmail.com

Step One: Sign up for an OpenAI account and get OpenAI key

Step Two: Install Homebrew (Mac Only) and Python (Both Windows and Mac)

Install Homebrew (Mac Only):

Install Python (Mac Users):

Install Python (Windows Users):

Step Three: Install OpenAI Library

Step Four: Download Social Media Data (Steps are for each media, you can choose which one you’d like but don’t have to do each!)

Facebook:

Instagram:

Twitter:

Step Five: Format Your Data Into the CSV Template

The CSV template is located here. Please make a copy for your own use: https://docs.google.com/spreadsheets/d/1GAXYLI5ahxuKp3445oYgLuoaYIQJ2cTQKnRyQBB9_2k/edit?usp=sharing

NOTE: All prompts and completions should be in English. GPT-3 doesn’t do too well with other languages. If your social media messages are in a language other than English, please translate them before transferring them to the CSV.

Step Six: Create folder and download CSV

Step Seven: Fine-Tune Your Model

Preparation:

  1. Download spreadsheet as CSV
  2. Put in a folder on your desktop titled “bot”
  3. Rename your CSV to “train.csv”

Fine-Tuning Instructions: See written instructions below videos

WINDOWS:

MAC:

WRITTEN INSTRUCTIONS ALL SYSTEMS:

  1. Make sure csv file has as its first row columns for “prompt” and “completion”
  2. Cd into folder with training file CSV by typing and then pressing enter:

cd desktop/bot

  1. Convert csv to JSONL file by typing the following into the command prompt window and pressing enter:

openai tools fine_tunes.prepare_data -f train.csv

  1. Hit y to all (doc will be converted)
  2. Copy key from OpenAI website (login > Personal > View API Keys)
  3. MAC – enter the following line with your API key where it says KEY into the command prompt window and press enter:

export OPENAI_API_KEY=”KEY”

  1. Alternative to step 6 for Windows – enter the following line with your API key where it says KEY into the command prompt window and press enter:

setx OPENAI_API_KEY “KEY”

THEN, ON WINDOWS ONLY, CLOSE COMMAND PROMPT WINDOW AND START NEW WINDOW, CD BACK INTO THE FOLDER WITH YOUR CSV

  1. Enter the following line into the command prompt window and press enter:

openai api fine_tunes.create -t train_prepared.jsonl -m davinci