Closed bytestream closed 2 weeks ago
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
https://github.com/openai-php/client/blob/061a73827795d01a4fab1a580e08bc5b92d90999/src/Resources/Models.php#L30 $response->data() returns array|string but ListResponse::from() only accepts array.
$response->data()
array|string
ListResponse::from()
array
$response->data() is intermittently returning "404 page not found\n"
"404 page not found\n"
OpenAI::client('...')->models()->list()->data
v0.10.1
8.1.24
No response
Hi @bytestream
I am not able to reproduce the bug. Feel free to reopen the issue, if you can still reproduce the error.
Description
https://github.com/openai-php/client/blob/061a73827795d01a4fab1a580e08bc5b92d90999/src/Resources/Models.php#L30
$response->data()
returnsarray|string
butListResponse::from()
only acceptsarray
.$response->data()
is intermittently returning"404 page not found\n"
Steps To Reproduce
OpenAI PHP Client Version
v0.10.1
PHP Version
8.1.24
Notes
No response