Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: $client->fineTuning()->listJobs() throws error when Fine Tunning contains the failed fine-tunning job. #507

Open
dovelive opened this issue Dec 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dovelive
Copy link

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 ...

image

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

@dovelive dovelive added the bug Something isn't working label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant