OpenDive / OpenAIKit

Swift Package for OpenAI's API
MIT License
248 stars 46 forks source link

Add ImageVariationsParameters init for Data #32

Closed ronaldmannak closed 1 year ago

ronaldmannak commented 1 year ago

Describe your changes

Add a third public initializer for ImageVariationsParameters that accepts a raw PNG as Data. This initializer is helpful in scenarios where the original images are persisted as platform-agnostic data (e.g. in CoreData or CloudKit).

Checklist before requesting a review

MarcoDotIO commented 1 year ago

Thank you! I will add another function initializer in the Image Edit Parameter that will take the same arguments for Data types in the next commit.

ronaldmannak commented 1 year ago

Awesome. I haven't used Image Edit yet, but yes, makes sense to add a Data argument there too