Dalle
Last updated
Last updated
You need to install the openai
library.
Set the OPENAI_API_KEY
environment variable.
The following agent will use DALL-E to generate an image based on a text prompt.
cookbook/tools/dalle_tools.py
model
str
"dall-e-3"
The DALL-E model to use
n
int
1
Number of images to generate
size
str
"1024x1024"
Image size (256x256, 512x512, 1024x1024, 1792x1024, or 1024x1792)
quality
str
"standard"
Image quality (standard or hd)
style
str
"vivid"
Image style (vivid or natural)
api_key
str
None
The OpenAI API key for authentication
generate_image
Generates an image based on a text prompt