Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Michael 874d93b56e
docs: Update example configs with descriptions (#4283)
2 months ago
..
360d7b519d
docs(examples): add uniform init commands to all example READMEs (#4068)
3 months ago
874d93b56e
docs: Update example configs with descriptions (#4283)
2 months ago

README.md

You have to be logged in to leave a comment. Sign In

openai-dalle-images (OpenAI DALL-E Image Generation Example)

You can run this example with:

npx promptfoo@latest init --example openai-dalle-images

A simple example showing how to evaluate OpenAI's DALL-E image generation models with promptfoo.

Quick Start

# Create this example
npx promptfoo@latest init --example openai-dalle-images

# Set your API key
export OPENAI_API_KEY=your-key-here

# Run the evaluation
promptfoo eval

# View the results
promptfoo view

What's in this Example

  • Tests two artistic style prompts (Van Gogh vs. Dali)
  • Compares DALL-E 3 and DALL-E 2 outputs
  • Configures different image sizes and response formats
  • Tests with different subjects

Key Notes

  • Each model supports different sizes:
    • DALL-E 3: 1024x1024, 1792x1024, 1024x1792
    • DALL-E 2: 256x256, 512x512, 1024x1024
  • response_format: b64_json returns raw JSON with base64-encoded image data. Image links with the default format url expire after ~ 2 hours.

Documentation

Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...