Sandro Gehri
Sandro Gehri
An extended factory has been added in v0.4.0. @LeoVie Thank you very much for your help and patience.
This can now be achieved by using the newly introduced factory: ```php $client = OpenAI::factory() ->withHttpClient(new \GuzzleHttp\Client(['timeout' => 2.0])) ->make(); ```
Hi @ali-m2020 Thank you for input. But I can't see what the benefit of not throwing an exception should be, because in my opinion all the 4 things you mentioned...
closed due to inactivity
Hi @timmoh Thank you for raising this issue. I took a closer look into the Azure documentation and it looks like it is not enough to just change the endpoint...
Hi @duellsy Thank you for the confirmation. I think the upcoming change to the package would help here: https://github.com/openai-php/client/pull/75 The only thing we would have to add is a new...
Sorry, if it wasn't clear 😅 Here is the full example: ```php $client = OpenAI::factory() ->withBaseUrl('https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}') ->withHttpHeader('api-key', '{your-api-key}') ->withQueryParams(['api-version' => '{version}']) ->make(); ```
This should now work using the newly introduced factory: ```php $client = OpenAI::factory() ->withApiKey('') ->withBaseUri('{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}') ->withHttpHeader('api-key', '{your-api-key}') ->withQueryParam('api-version', '{version}') ->make(); ``` @duellsy Could you please verify this for us?
@duellsy I thought it would be nice to have a section in the Readme about this. So I have stolen some parts of your answer. Glad if you could give...
Hi @defunctl Personally I've never worked with async requests in Guzzle, but it doesn't look too complicated. And for me there are more important improvements to do before, from which...