Require support DALL-E model
shixinyu opened this issue · 6 comments
Greeting, Please consider add support DALL-E and in Azure OpenAI, the API route will be :
https://xxx.openai.azure.com/openai/images/generations:submit?api-version=2023-06-01-preview
Is there an API documentation?
import requests import time import os api_base = 'https://aceplaying.openai.azure.com/' api_key = os.getenv("OPENAI_API_KEY") api_version = '2023-06-01-preview' url = "{}openai/images/generations:submit?api-version={}".format(api_base, api_version) headers= { "api-key": api_key, "Content-Type": "application/json" } body = { "prompt": "USER_PROMPT_GOES_HERE", "n": 2, "resolution": "1024x1024" } submission = requests.post(url, headers=headers, json=body) operation_location = submission.headers['Operation-Location'] retry_after = submission.headers['Retry-after'] status = "" while (status != "Succeeded"): time.sleep(int(retry_after)) response = requests.get(operation_location, headers=headers) status = response.json()['status'] image_url = response.json()['result']['contentUrl']
Just saw it from Azure Portal, does it help?
This is not a valid API document, and I cannot rely on it to complete the task. I have studied the differences between OpenAI's DALLE API and Azure's preview API previously, and they are quite significant, making it impossible to act as a proxy.
Alright, thank you for your working.
Let's wait for MS release full DALLE API.
Alright, thank you for your working. Let's wait for MS release full DALLE API.
ok