openai-php / client

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

TypeError: OpenAI::client(): Argument #1 ($apiKey) must be of type string, null given #228

Closed bardolf69 closed 11 months ago

bardolf69 commented 11 months ago

$oaClient = \OpenAI::client('sk-*****************************N'); obviously I've removed most of the API key but I have verified that the key is valid and active. I am running v0.7.4. Does anyone have any ideas where I can start looking?

gehrisandro commented 11 months ago

@bardolf69 This looks strange to me, as you pass a string and not null. Probably there is something else wrong in your call.

Maybe a complete stack trace would help.