pub struct ImageGeneration {
pub type_: String,
pub action: Option<ImageGenerationAction>,
pub background: Option<ImageGenerationBackground>,
pub input_fidelity: Option<ImageGenerationInputFidelity>,
pub input_image_mask: Option<ImageGenerationInputImageMask>,
pub model: Option<String>,
pub moderation: Option<ImageGenerationModeration>,
pub output_compression: Option<i64>,
pub output_format: Option<ImageGenerationOutputFormat>,
pub partial_images: Option<i64>,
pub quality: Option<ImageGenerationQuality>,
pub size: Option<ImageGenerationSize>,
}Expand description
A tool that generates images using the GPT image models.
Fields§
§type_: StringThe type of the image generation tool. Always image_generation.
action: Option<ImageGenerationAction>Whether to generate a new image or edit an existing image. Default: auto.
background: Option<ImageGenerationBackground>Background type for the generated image.
input_fidelity: Option<ImageGenerationInputFidelity>Control how much effort the model will exert to match the style and features,
input_image_mask: Option<ImageGenerationInputImageMask>Optional mask for inpainting.
model: Option<String>The image generation model to use. Default: gpt-image-1.
moderation: Option<ImageGenerationModeration>Moderation level for the generated image. Default: auto.
output_compression: Option<i64>Compression level for the output image. Default: 100.
output_format: Option<ImageGenerationOutputFormat>The output format of the generated image.
partial_images: Option<i64>Number of partial images to generate in streaming mode, from 0 (default value)
quality: Option<ImageGenerationQuality>The quality of the generated image.
size: Option<ImageGenerationSize>The size of the generated image.
Trait Implementations§
Source§impl Clone for ImageGeneration
impl Clone for ImageGeneration
Source§fn clone(&self) -> ImageGeneration
fn clone(&self) -> ImageGeneration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageGeneration
impl Debug for ImageGeneration
Source§impl<'de> Deserialize<'de> for ImageGeneration
impl<'de> Deserialize<'de> for ImageGeneration
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ImageGeneration
impl RefUnwindSafe for ImageGeneration
impl Send for ImageGeneration
impl Sync for ImageGeneration
impl Unpin for ImageGeneration
impl UnsafeUnpin for ImageGeneration
impl UnwindSafe for ImageGeneration
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