images {openaistream} | R Documentation |
images Class
Description
images Class
images Class
Super class
openaistream::openai
-> images
Methods
Public methods
Inherited methods
Method create()
Creates an image given a prompt.
Usage
images$create(prompt, ..., verbosity = 0)
Arguments
prompt
character Required. A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2 and 4000 characters for dall-e-3
...
Additional parameters as required by the OpenAI API.For example:n;quality;response_format...
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
Returns
Returns a list of image objects.
Method edit()
Creates an edited or extended image given an original image and a prompt.
Usage
images$edit(image, prompt, ..., verbosity = 0)
Arguments
image
character Required. The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.
prompt
character Required. A text description of the desired image(s). The maximum length is 1000 characters.
...
Additional parameters as required by the OpenAI API.For example:mask;model;n...
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
Returns
Returns a list of image objects.
Method variation()
Creates a variation of a given image.
Usage
images$variation(image, ..., verbosity = 0)
Arguments
image
character Required. The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
...
Additional parameters as required by the OpenAI API.For example:model;n;response_format
verbosity
numeric. Verbosity level for the API call(0:no output;1:show headers; 2:show headers and bodies;3: show headers, bodies, and curl status messages.).
Returns
Returns a list of image objects.
Method clone()
The objects of this class are cloneable with this method.
Usage
images$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.