-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
Azurefor issues relating to the Azure OpenAI servicefor issues relating to the Azure OpenAI servicebugSomething isn't workingSomething isn't working
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
The AzureOpenAI client has an endpoint for /images/generations but does not contain an endpoint for '/images/edits'.
This causes a 404 error when attempting to call the edits endpoint with an AzureOpenAI client.
To Reproduce
from openai import AzureOpenAI
client = AzureOpenAI(
api_version=config.OPENAI_API_VERSION,
api_key=config.AZURE_OPENAI_API_KEY,
azure_endpoint=config.AZURE_OPENAI_ENDPOINT
)
...
response = client.images.edit(
model="gpt-image-1",
prompt=prompt,
image=image_bytes,
size=config.IMAGE_SIZE,
quality=config.IMAGE_QUALITY,
n=config.IMAGE_COUNT,
output_format="png",
output_compression=100,
)
Catch this error: openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
Code snippets
OS
Windows
Python version
3.12
Library version
1.105.0
Metadata
Metadata
Assignees
Labels
Azurefor issues relating to the Azure OpenAI servicefor issues relating to the Azure OpenAI servicebugSomething isn't workingSomething isn't working