pub struct ImageGenTool {
pub model: Option<ImageGenToolModel>,
pub quality: Option<ImageGenToolQuality>,
pub size: Option<ImageGenToolSize>,
pub output_format: Option<ImageGenToolOutputFormat>,
pub output_compression: Option<u64>,
pub moderation: Option<ImageGenToolModeration>,
pub background: Option<ImageGenToolBackground>,
pub input_image_mask: Option<ImageGenToolInputImageMask>,
pub partial_images: Option<u64>,
}
Expand description
A tool that generates images using a model like gpt-image-1
.
Fields§
§model: Option<ImageGenToolModel>
The image generation model to use. Default: gpt-image-1
.
quality: Option<ImageGenToolQuality>
The quality of the generated image. One of low
, medium
, high
,
or auto
. Default: auto
.
size: Option<ImageGenToolSize>
The size of the generated image. One of 1024x1024
, 1024x1536
,
1536x1024
, or auto
. Default: auto
.
output_format: Option<ImageGenToolOutputFormat>
The output format of the generated image. One of png
, webp
, or
jpeg
. Default: png
.
output_compression: Option<u64>
Compression level for the output image. Default: 100.
moderation: Option<ImageGenToolModeration>
Moderation level for the generated image. Default: auto
.
background: Option<ImageGenToolBackground>
Background type for the generated image. One of transparent
,
opaque
, or auto
. Default: auto
.
input_image_mask: Option<ImageGenToolInputImageMask>
Optional mask for inpainting. Contains image_url
(string, optional) and file_id
(string, optional).
partial_images: Option<u64>
Number of partial images to generate in streaming mode, from 0 (default value) to 3.
Implementations§
Source§impl ImageGenTool
impl ImageGenTool
Sourcepub fn builder() -> ImageGenToolBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> ImageGenToolBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building ImageGenTool
.
On the builder, call .model(...)
(optional), .quality(...)
(optional), .size(...)
(optional), .output_format(...)
(optional), .output_compression(...)
(optional), .moderation(...)
(optional), .background(...)
(optional), .input_image_mask(...)
(optional), .partial_images(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of ImageGenTool
.
Trait Implementations§
Source§impl Clone for ImageGenTool
impl Clone for ImageGenTool
Source§fn clone(&self) -> ImageGenTool
fn clone(&self) -> ImageGenTool
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more