#[non_exhaustive]pub struct CreateImageRequest {Show 13 fields
pub prompt: String,
pub model: Option<String>,
pub n: Option<u32>,
pub background: Option<String>,
pub moderation: Option<String>,
pub output_format: Option<String>,
pub output_compression: Option<u8>,
pub quality: Option<String>,
pub response_format: Option<String>,
pub size: Option<String>,
pub style: Option<String>,
pub user: Option<String>,
pub extra: BTreeMap<String, Value>,
}Expand description
EN: Request body for POST /v1/images/generations.
中文:POST /v1/images/generations 的请求体。
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.prompt: StringEN: Text prompt describing the image to generate. 中文:描述要生成图像的文本提示。
model: Option<String>EN: Optional image generation model id. 中文:可选的图像生成模型 ID。
n: Option<u32>EN: Optional number of images to generate. 中文:可选的生成图像数量。
background: Option<String>EN: Optional background mode. 中文:可选的背景模式。
moderation: Option<String>EN: Optional image moderation level. 中文:可选的图像审核级别。
output_format: Option<String>EN: Optional output image format. 中文:可选的输出图像格式。
output_compression: Option<u8>EN: Optional output compression percentage. 中文:可选的输出压缩百分比。
quality: Option<String>EN: Optional output quality. 中文:可选的输出质量。
response_format: Option<String>EN: Optional response format for supported models. 中文:受支持模型的可选响应格式。
size: Option<String>EN: Optional generated image size. 中文:可选的生成图像尺寸。
style: Option<String>EN: Optional style for supported models. 中文:受支持模型的可选风格。
user: Option<String>EN: Optional end-user identifier. 中文:可选的终端用户标识。
extra: BTreeMap<String, Value>EN: Forward-compatible optional fields not yet covered by handwritten types. 中文:手写类型尚未覆盖的前向兼容可选字段。
Implementations§
Source§impl CreateImageRequest
impl CreateImageRequest
Sourcepub fn builder() -> CreateImageRequestBuilder
pub fn builder() -> CreateImageRequestBuilder
EN: Starts building an image generation request. 中文:开始构建图像生成请求。
Trait Implementations§
Source§impl Clone for CreateImageRequest
impl Clone for CreateImageRequest
Source§fn clone(&self) -> CreateImageRequest
fn clone(&self) -> CreateImageRequest
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 CreateImageRequest
impl Debug for CreateImageRequest
Source§impl PartialEq for CreateImageRequest
impl PartialEq for CreateImageRequest
Source§fn eq(&self, other: &CreateImageRequest) -> bool
fn eq(&self, other: &CreateImageRequest) -> bool
self and other values to be equal, and is used by ==.