pub struct CreateImageVariationRequest {
pub image: Vec<u8>,
pub model: Option<Model>,
pub n: Option<i64>,
pub response_format: Option<ResponseFormat>,
pub size: Option<Size>,
pub user: Option<String>,
}Fields§
§image: Vec<u8>The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
model: Option<Model>The model to use for image generation. Only dall-e-2 is supported at this time.
n: Option<i64>The number of images to generate. Must be between 1 and 10.
response_format: Option<ResponseFormat>The format in which the generated images are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated.
size: Option<Size>The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.
user: Option<String>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Implementations§
Source§impl CreateImageVariationRequest
impl CreateImageVariationRequest
Sourcepub fn builder() -> CreateImageVariationRequestBuilder<((), (), (), (), (), ())>
pub fn builder() -> CreateImageVariationRequestBuilder<((), (), (), (), (), ())>
Create a builder for building CreateImageVariationRequest.
On the builder, call .image(...), .model(...)(optional), .n(...)(optional), .response_format(...)(optional), .size(...)(optional), .user(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of CreateImageVariationRequest.
Trait Implementations§
Source§impl Clone for CreateImageVariationRequest
impl Clone for CreateImageVariationRequest
Source§fn clone(&self) -> CreateImageVariationRequest
fn clone(&self) -> CreateImageVariationRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateImageVariationRequest
impl Debug for CreateImageVariationRequest
Source§impl<'de> Deserialize<'de> for CreateImageVariationRequest
impl<'de> Deserialize<'de> for CreateImageVariationRequest
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>,
Source§impl PartialEq for CreateImageVariationRequest
impl PartialEq for CreateImageVariationRequest
Source§fn eq(&self, other: &CreateImageVariationRequest) -> bool
fn eq(&self, other: &CreateImageVariationRequest) -> bool
self and other values to be equal, and is used by ==.