go-openai icon indicating copy to clipboard operation
go-openai copied to clipboard

json: cannot unmarshal string into Go struct field Hyperparameters.hyperparameters.n_epochs of type int

Open BrendanMartin opened this issue 2 years ago • 0 comments

CreateFineTuningJob results in the error: json: cannot unmarshal string into Go struct field Hyperparameters.hyperparameters.n_epochs of type int

It looks like OpenAI is returning the following default for Hyperparameters now:

"hyperparameters": {
    "n_epochs": "auto"
},

And CreateFineTuningJob's response decodes to FineTuningJob, where Hyperparameters are defined as an int type.

The "auto" value eventually turns into an int when you list succeeded jobs, though.

BrendanMartin avatar Sep 22 '23 15:09 BrendanMartin