openai-php / client

⚡️ OpenAI PHP is a supercharged community-maintained PHP API client that allows you to interact with OpenAI API.
MIT License
4.98k stars 519 forks source link

[Bug]: Undefinded array key "created" in src/Responses/Models/RetrieveResponse #457

Open BjornValkOptimizers opened 4 months ago

BjornValkOptimizers commented 4 months ago

Description

When using the Azure OpenAI, calling $client->models()->list() will result in a "Undefined array key "created" exception thrown by src/Responses/Models/RetrieveResponse.

Steps To Reproduce

create a client using: $client = OpenAI::factory() ->withBaseUri('{your-resource-name}.openai.azure.com/openai') ->withHttpHeader('api-key', '{your-api-key}') ->withQueryParam('api-version', '{version}') ->make();

fetch and output the response of models list using $client->models()->list()

OpenAI PHP Client Version

v0.10.1

PHP Version

8.1.0

Notes

No response