Skip to content

Instantly share code, notes, and snippets.

@ShayneP
Last active October 7, 2024 18:52
Show Gist options
  • Save ShayneP/60c64e46ed18971709d14b7d190ccd72 to your computer and use it in GitHub Desktop.
Save ShayneP/60c64e46ed18971709d14b7d190ccd72 to your computer and use it in GitHub Desktop.
Upload training JSON file
from openai import OpenAI
client = OpenAI()
client.files.create(
file=open("mydata.jsonl", "rb"),
purpose="fine-tune"
)
client.fine_tuning.jobs.create(
training_file="mydata",
model="gpt-4o-mini-2024-07-18"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment