pub struct CreateImageVariationParameters {
pub image: FileUpload,
pub model: Option<String>,
pub n: Option<u32>,
pub response_format: Option<ResponseFormat>,
pub size: Option<ImageSize>,
pub user: Option<String>,
}Fields§
§image: FileUpload用作变体基础的图像。必须是有效的PNG文件,小于4MB,且为正方形。
model: Option<String>用于图像生成的模型。目前仅支持dall-e-2。
n: Option<u32>要生成的图像数量。必须介于1到10之间。对于dall-e-3,仅支持n=1。
response_format: Option<ResponseFormat>返回生成图像的格式。必须是url或b64_json之一。
size: Option<ImageSize>生成图像的尺寸。对于gpt-image-1必须是1024x1024、1536x1024(横向)、1024x1536(纵向)或auto(默认值), 对于dall-e-2是256x256、512x512或1024x1024之一,对于dall-e-3是1024x1024、1792x1024或1024x1792之一。
user: Option<String>表示您的最终用户的唯一标识符,可以帮助OpenAI监控和检测滥用行为。
Trait Implementations§
Source§impl Clone for CreateImageVariationParameters
impl Clone for CreateImageVariationParameters
Source§fn clone(&self) -> CreateImageVariationParameters
fn clone(&self) -> CreateImageVariationParameters
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 moreSource§impl Default for CreateImageVariationParameters
impl Default for CreateImageVariationParameters
Source§fn default() -> CreateImageVariationParameters
fn default() -> CreateImageVariationParameters
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CreateImageVariationParameters
impl<'de> Deserialize<'de> for CreateImageVariationParameters
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
Source§impl PartialEq for CreateImageVariationParameters
impl PartialEq for CreateImageVariationParameters
Source§fn eq(&self, other: &CreateImageVariationParameters) -> bool
fn eq(&self, other: &CreateImageVariationParameters) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateImageVariationParameters
Auto Trait Implementations§
impl !Freeze for CreateImageVariationParameters
impl RefUnwindSafe for CreateImageVariationParameters
impl Send for CreateImageVariationParameters
impl Sync for CreateImageVariationParameters
impl Unpin for CreateImageVariationParameters
impl UnwindSafe for CreateImageVariationParameters
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