[SOLVED] File upload REST API help?

I understand now

you need to send the file as a byte stream. Tell me the programming language you are using and I will see if I have some sample code that will help

Here is a Python example

openai.File.create(
file=open(“mydata.jsonl”, “rb”),
purpose=‘fine-tune’
)

Then you might back

file-XGinujblHPwGLSztz8cPS8XY

as the id

Then you call

openai.FineTune.create(
training_file = “file-XGinujblHPwGLSztz8cPS8XY”,
model = “ada”,
suffix = “chatbot”,
)

and you get back

ada:ft-your-org:chatbot-2022-12-18-07-47-04

(or similar)