Class: OpenAI::Images
- Inherits:
-
Object
- Object
- OpenAI::Images
- Defined in:
- lib/openai/images.rb
Instance Method Summary collapse
- #edit(parameters: {}) ⇒ Object
- #generate(parameters: {}) ⇒ Object
-
#initialize(client: nil) ⇒ Images
constructor
A new instance of Images.
- #variations(parameters: {}) ⇒ Object
Constructor Details
#initialize(client: nil) ⇒ Images
Returns a new instance of Images.
3 4 5 |
# File 'lib/openai/images.rb', line 3 def initialize(client: nil) @client = client end |
Instance Method Details
#edit(parameters: {}) ⇒ Object
11 12 13 |
# File 'lib/openai/images.rb', line 11 def edit(parameters: {}) @client.multipart_post(path: "/images/edits", parameters: open_files(parameters)) end |
#generate(parameters: {}) ⇒ Object
7 8 9 |
# File 'lib/openai/images.rb', line 7 def generate(parameters: {}) @client.json_post(path: "/images/generations", parameters: parameters) end |
#variations(parameters: {}) ⇒ Object
15 16 17 |
# File 'lib/openai/images.rb', line 15 def variations(parameters: {}) @client.multipart_post(path: "/images/variations", parameters: open_files(parameters)) end |