valentinegb / openai

An unofficial Rust library for the OpenAI API.
https://crates.io/crates/openai/
MIT License
61 stars 18 forks source link

Add image generation and its editing/variation endpoints #59

Open Lypt0x opened 1 year ago

Lypt0x commented 1 year ago

In my pull request, I just added:

  1. Generating a new image based on a given prompt and/or an input
  2. Creating an edited or extended image given an original image and a prompt.

The modifications to the code provide two new features for image manipulation to OpenAI API users. They allow the generation of new images based on a given prompt and/or an input image and the creation of edited or extended images given an original image and a prompt. The new code is modular, with each feature defined in a separate struct and associated functions. The code is also tested and documented, making it easier for users to understand and use the new features.