I am trying to fine-tune a GPT model through the Azure OpenAI API.
I now need to upload the file to openai using the code below:
file_name = "training_data_prepared.jsonl"
upload_response = openai.File.create(
file=open(file_name, "rb"),
purpose='fine-tune')
upload_response
However, when I run the code now, I get the following error:
InvalidRequestError: fileName contains an invalid filename: wrong suffix.
Everything is set up correctly on the API side, and I have converted a csv to jsonl using the 'openai tools fine_tunes.prepare_data' command and it correctly created the jsonl file. The configuration of the json file should be correct, and follows the openai guidelines for creating a fine-tuning dataset.