[Bug]: Images (Dall-e 3) method not working with Azure
Description
Trying to create a custom factory to use Dall-e 3 with Azure does not work with the client library. It gives a "resource not found" error, although the resource exists and works with other client libraries.
Steps To Reproduce
- Setup an Azure OpenAI factory:
$client = \OpenAI::factory() ->withBaseUri('{resource}.openai.azure.com/openai/deployments/{deployment-name}') ->withHttpHeader('api-key', 'XXXXX') ->withQueryParam('api-version', '2023-06-01-preview') ->make();
$response = $client->images()->create([
'prompt' => 'a monkey eating a banana',
'n' => 1,
'size' => '1024x1024',
//'response_format' => 'url',
]);
- Try to run the route, get "resource not found" exception.
I have tried changing the base URI to {resource}.openai.azure.com as well and added deployment name in the create method, but the issue persists.
OpenAI PHP Client Version
^0.8.4
PHP Version
8.2.12
Notes
No response
API-Version 2024-02-15-preview has helped for me!
Hi @kukicado
This does not look like an error related to the package.
If you do not agree, feel free to reopen the issue.