Fine-tuning Instructions

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:

  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