Using ChatGPT to write a DALL-E 2 application
Using ChatGPT to create code to generate images by DALL-E using the OpenAI API.
OpenAI provides two of the greatest AI tools of the moment; a Large Language Model trained for conversational speech named chatGPT and text-to-image model Dall-E 2.
ChatGPT is the successor of GTP-3 and is a stateful chat engine. It uses previous interactions in the same chat to determine it answer, giving it a more conversational feeling. More information can be found in the blog post on the website of OpenAI.
The OpenAI API makes it possible to call the Dall-E 2 model for image generation. ChatGPT is not (yet) supported. This article describes how to use the Dall-E 2 API to generate images from prompts.
The normal way to start is to read the API documentation provided. But the owner of the API also has this smart chatbot. So is it possible to develop the code required for image generation with the help of chatGPT?
So let’s try it!
Getting started
My first question to chatGPT was ‘How do I call DALL-E API from Python?
’. After a second, chatGPT starts spitting out the answer: