feat: Adding DALLE image generator
Related Issues
- fixes #issue-number
Proposed Changes:
Adds DALLEImageGenerator which calls OpenAI's image generation endpoint to generate images based on a prompt.
How did you test it?
Added unit tests, more to come.
Notes for the reviewer
Checklist
- I have read the contributors guidelines and the code of conduct
- I have updated the related issue with new insights and changes
- I added unit tests and updated the docstrings
- I've used one of the conventional commit types for my PR title:
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:. - I documented my code
- I ran pre-commit hooks and fixed any issue
Pull Request Test Coverage Report for Build 11832702382
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+0.04%) to 90.214%
| Totals | |
|---|---|
| Change from base Build 11799929241: | 0.04% |
| Covered Lines: | 7817 |
| Relevant Lines: | 8665 |
💛 - Coveralls
It looks good, though I'm wondering if it would be better to return a list of
ByteStreams that contain the images. 🤔
Hmm interesting point, I'd rather wait on that when we have the conversation about how Haystack could generally support passing around images.
For now this is just outputting directly the format from OpenAI.
Also passing it back as a url or base64 it allows for embedding in markdown to view the image right away :)
Hey @silvanocerza is there anything else I need to do for this PR?