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]: Argument #1 ($attributes) must be of type array, string given #478

Open
bytestream opened this issue Sep 19, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@bytestream
Copy link

bytestream commented Sep 19, 2024

Description

OpenAI\Responses\Models\ListResponse::from(): Argument #1 ($attributes) must be of type array, string given, called in /vendor/openai-php/client/src/Resources/Models.php on line 30

return ListResponse::from($response->data(), $response->meta());
$response->data() returns array|string but ListResponse::from() only accepts array.

$response->data() is intermittently returning "404 page not found\n"

Steps To Reproduce

OpenAI::client('...')->models()->list()->data

OpenAI PHP Client Version

v0.10.1

PHP Version

8.1.24

Notes

No response

@bytestream bytestream added the bug Something isn't working label Sep 19, 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