pub struct ImageGenerationArgs { /* private fields */ }
Expand description
Builder for ImageGeneration
.
Implementations§
Source§impl ImageGenerationArgs
impl ImageGenerationArgs
Sourcepub fn background<VALUE: Into<ImageGenerationBackground>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn background<VALUE: Into<ImageGenerationBackground>>( &mut self, value: VALUE, ) -> &mut Self
Background type: transparent, opaque, or auto.
Sourcepub fn input_image_mask<VALUE: Into<InputImageMask>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn input_image_mask<VALUE: Into<InputImageMask>>( &mut self, value: VALUE, ) -> &mut Self
Optional mask for inpainting.
Sourcepub fn model<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn model<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Model to use (default: gpt-image-1).
Sourcepub fn moderation<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn moderation<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Moderation level (default: auto).
Sourcepub fn output_compression<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
pub fn output_compression<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
Compression level (0-100).
Sourcepub fn output_format<VALUE: Into<ImageGenerationOutputFormat>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn output_format<VALUE: Into<ImageGenerationOutputFormat>>( &mut self, value: VALUE, ) -> &mut Self
Output format: png, webp, or jpeg.
Sourcepub fn partial_images<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
pub fn partial_images<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
Number of partial images (0-3).
Sourcepub fn quality<VALUE: Into<ImageGenerationQuality>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn quality<VALUE: Into<ImageGenerationQuality>>( &mut self, value: VALUE, ) -> &mut Self
Quality: low, medium, high, or auto.
Sourcepub fn size<VALUE: Into<ImageGenerationSize>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn size<VALUE: Into<ImageGenerationSize>>( &mut self, value: VALUE, ) -> &mut Self
Size: e.g. “1024x1024” or auto.
Sourcepub fn build(&self) -> Result<ImageGeneration, OpenAIError>
pub fn build(&self) -> Result<ImageGeneration, OpenAIError>
Trait Implementations§
Source§impl Clone for ImageGenerationArgs
impl Clone for ImageGenerationArgs
Source§fn clone(&self) -> ImageGenerationArgs
fn clone(&self) -> ImageGenerationArgs
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ImageGenerationArgs
impl RefUnwindSafe for ImageGenerationArgs
impl Send for ImageGenerationArgs
impl Sync for ImageGenerationArgs
impl Unpin for ImageGenerationArgs
impl UnwindSafe for ImageGenerationArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more