Open
Description
Confirm this is a feature request for the Python library and not the underlying OpenAI API.
- This is a feature request for the Python library
Describe the feature or improvement you're requesting
Description
The _deployments_endpoints set defined in src/openai/lib/azure.py is missing the images/edit endpoints. This may cause issues when working with Azure deployments for editing images.
https://github.com/openai/openai-python/blob/main/src/openai/lib/azure.py#19-19
Relevant Code
_deployments_endpoints = set(
[
"/completions",
"/chat/completions",
"/embeddings",
"/audio/transcriptions",
"/audio/translations",
"/audio/speech",
"/images/generations",
]
)
Suggested Fix
Include the missing endpoint "/images/edit" in the _deployments_endpoints set.
_deployments_endpoints = set(
[
"/completions",
"/chat/completions",
"/embeddings",
"/audio/transcriptions",
"/audio/translations",
"/audio/speech",
"/images/generations",
"/images/edits", # Add this line
]
)
Steps to Reproduce
Use an Azure deployment for the images/edit endpoint.
Observe that the endpoint is not handled correctly due to its absence in _deployments_endpoints.
Environment
Repository: openai/openai-python
File: src/openai/lib/azure.py
Commit: fad098f
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels