haystack icon indicating copy to clipboard operation
haystack copied to clipboard

feat: Adding DALLE image generator

Open sjrl opened this issue 1 year ago • 3 comments

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

sjrl avatar Oct 09 '24 14:10 sjrl

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 Coverage Status
Change from base Build 11799929241: 0.04%
Covered Lines: 7817
Relevant Lines: 8665

💛 - Coveralls

coveralls avatar Oct 10 '24 12:10 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.

sjrl avatar Oct 18 '24 13:10 sjrl

Also passing it back as a url or base64 it allows for embedding in markdown to view the image right away :)

sjrl avatar Oct 18 '24 13:10 sjrl

Hey @silvanocerza is there anything else I need to do for this PR?

sjrl avatar Oct 31 '24 08:10 sjrl