The midjourney adapter is stubbed in image_generators/midjourney.py but not implemented. Contributions welcome.
What's needed:
- Implement
MidjourneyAdapter.generate(spec) using the Midjourney API (or an unofficial wrapper)
- Honor
api_key, aspect_ratio, and output_dir from config.json under image_generator.midjourney
- Poll for completion, download the final image, save 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
midjourneyadapter is stubbed inimage_generators/midjourney.pybut not implemented. Contributions welcome.What's needed:
MidjourneyAdapter.generate(spec)using the Midjourney API (or an unofficial wrapper)api_key,aspect_ratio, andoutput_dirfromconfig.jsonunderimage_generator.midjourneyspec["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.