The dalle adapter is stubbed in image_generators/dalle.py but not implemented. Contributions welcome.
What's needed:
- Implement
DalleAdapter.generate(spec) using the OpenAI Images API
- Honor
api_key, model (default dall-e-3), size, and output_dir from config.json under image_generator.dalle
- Build the prompt from the pillar + quote, generate, download to
spec["output_path"]
- Follow the
ImageGenerator ABC in image_generators/base.py
Spec the adapter receives:
{
"pillar": "P1" | "P2" | "P3",
"quote": str,
"handle": str,
"figure_path": str | None,
"output_path": str,
}
See image_generators/pillow_local.py for a complete reference implementation and image_generators/canva.py for an API-driven example.
The
dalleadapter is stubbed inimage_generators/dalle.pybut not implemented. Contributions welcome.What's needed:
DalleAdapter.generate(spec)using the OpenAI Images APIapi_key,model(defaultdall-e-3),size, andoutput_dirfromconfig.jsonunderimage_generator.dallespec["output_path"]ImageGeneratorABC inimage_generators/base.pySpec the adapter receives:
{ "pillar": "P1" | "P2" | "P3", "quote": str, "handle": str, "figure_path": str | None, "output_path": str, }See
image_generators/pillow_local.pyfor a complete reference implementation andimage_generators/canva.pyfor an API-driven example.