pub struct ImageGenerateParams {Show 14 fields
pub model: Option<String>,
pub prompt: Option<String>,
pub n: Option<u32>,
pub size: Option<String>,
pub quality: Option<String>,
pub response_format: Option<String>,
pub background: Option<String>,
pub output_format: Option<String>,
pub moderation: Option<String>,
pub stream: Option<bool>,
pub partial_images: Option<u32>,
pub user: Option<String>,
pub metadata: BTreeMap<String, String>,
pub extra: BTreeMap<String, Value>,
}Expand description
表示图像生成请求参数。
Fields§
§model: Option<String>模型 ID。
prompt: Option<String>生成提示词。
n: Option<u32>结果数量。
size: Option<String>图像尺寸。
quality: Option<String>图像质量。
response_format: Option<String>响应格式。
background: Option<String>背景模式。
output_format: Option<String>输出格式。
moderation: Option<String>审核策略。
stream: Option<bool>是否启用流式图片事件。
partial_images: Option<u32>局部图片数量。
user: Option<String>用户标识。
metadata: BTreeMap<String, String>自定义 metadata。
extra: BTreeMap<String, Value>额外字段。
Trait Implementations§
Source§impl Clone for ImageGenerateParams
impl Clone for ImageGenerateParams
Source§fn clone(&self) -> ImageGenerateParams
fn clone(&self) -> ImageGenerateParams
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 Debug for ImageGenerateParams
impl Debug for ImageGenerateParams
Source§impl Default for ImageGenerateParams
impl Default for ImageGenerateParams
Source§fn default() -> ImageGenerateParams
fn default() -> ImageGenerateParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ImageGenerateParams
impl<'de> Deserialize<'de> for ImageGenerateParams
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 ImageGenerateParams
impl RefUnwindSafe for ImageGenerateParams
impl Send for ImageGenerateParams
impl Sync for ImageGenerateParams
impl Unpin for ImageGenerateParams
impl UnsafeUnpin for ImageGenerateParams
impl UnwindSafe for ImageGenerateParams
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