client
client copied to clipboard
[Bug]: $client->fineTuning()->listJobs() throws error when Fine Tunning contains the failed fine-tunning job.
Description
I have tried some fine tunings on my openai platform. And some of them are failed jobs. When I call the $client->fineTuning()->listJobs() function on my project, it throws the exception. I have checked the exception and it is because $attributes['hyperparameters'] is null for failed jobs.
OpenAI\Responses\FineTuning\RetrieveJobResponseHyperparameters::from(): Argument #1 ($attributes) must be of type array, null given, called in ...
I want to developer of this site to make the patch for this error quickly.
Steps To Reproduce
try {
$client = \OpenAI::client(config('openai.api_key'));
$response = $client->fineTuning()->listJobs();
$result = $response->toArray(); // ['object' => 'list', 'data' => [...]]
var_dump($result);
} catch (\Exception $e) {
report($e);
}
OpenAI PHP Client Version
v0.70.3
PHP Version
8.2
Notes
No response
Do you have an easy way I can fail a fine tuning job in order to replicate? Or can you provide a redacted/exact payload of the response?