Hi, I am trying to create a new fine-tuning model but when I send the request to create it, I get an error 400 (bad request) back… I don’t know what I am doing wrong.
I know authorization works, as I have tried some other endpoint and it worked…
This is the endpoint I am using: https://api.openai.com/v1/fine_tuning/jobs
Ok, so this is my json that I am sending:
I also tried with sending the file name instead of file id but that didn’t work either…
This is my code for reference:
var requestModel = new CreateFineTuneRequestModel
{
TrainingFile = trainingFileId,
Model = model
};
var requestJson = JsonConvert.SerializeObject(requestModel);
var endpoint = $"/v1/fine_tuning/jobs";
var response = await _httpClient.PostAsJsonAsync(endpoint, requestJson);
response.EnsureSuccessStatusCode();
Ok, so basically I just found out that if I have an older file, it works??? The way I make the training file is the same for all of them… Is there a timespan between when I can create a file and when I can use it? Because when I upload the file it is always successful…
If you are not able to use a new file, it usually indicates there is a problem with the json structure of that new file, have a look through it and see if you can spot any issues.
I assume you experience the issue when you attempt to create the fine-tuning job?
Note that you first have to upload the training file, which will return a file ID.
You then have to reference this particular file ID when creating the fine-tuning job.