Skip to content

[Bug]: Argument #1 ($attributes) must be of type array, string given #478

Closed
@bytestream

Description

@bytestream

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions