Hey, can you assist me in creating a basic Python script for using the DALL-E API? I want to tweak the sample code I will provide so that it saves the generated image in the same folder as the script. I'd like a simple squared picture with seed 5000 for a universe picture as a prompt for Dalle. I already have a working script for gpt-4. Can you help me adapt it for DALL-E?
completion = client.chat.completions.create(
model="gpt-4-1106-preview", # replace with the correct model name
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Translate the following English text to French: 'Hello, how are you?'"}
]
)
print(completion.choices[0].message)```