Closed kukicado closed 1 month ago
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.
1) 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', ]);
2) 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.
{resource}.openai.azure.com
^0.8.4
8.2.12
No response
API-Version 2024-02-15-preview has helped for me!
2024-02-15-preview
Hi @kukicado
This does not look like an error related to the package.
If you do not agree, feel free to reopen the issue.
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
1) 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();
2) 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