pub struct ImageGenBody<N>where
N: ImageGen,{
pub model: N,
pub prompt: Option<String>,
pub quality: Option<ImageQuality>,
pub size: Option<ImageSize>,
pub watermark_enabled: Option<bool>,
pub user_id: Option<String>,
}Expand description
Request body for image generation
Fields§
§model: NThe model to use for image generation
prompt: Option<String>Text description of the desired image
quality: Option<ImageQuality>Image-generation quality.
Hd favors detail and consistency; Standard favors lower latency.
The glm-image model supports only ImageQuality::Hd.
size: Option<ImageSize>Image size
Use an ImageSize preset or custom dimensions satisfying the limits
documented on that type.
watermark_enabled: Option<bool>Whether to add watermark to AI generated images
user_id: Option<String>Unique ID of the end user to help platform intervene against violations, illegal content generation, or other abusive behaviors
Implementations§
Trait Implementations§
Source§impl<N> Clone for ImageGenBody<N>
impl<N> Clone for ImageGenBody<N>
Source§fn clone(&self) -> ImageGenBody<N>
fn clone(&self) -> ImageGenBody<N>
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<N> Debug for ImageGenBody<N>
impl<N> Debug for ImageGenBody<N>
Source§impl<N> Serialize for ImageGenBody<N>
impl<N> Serialize for ImageGenBody<N>
Source§impl<N> Validate for ImageGenBody<N>where
N: ImageGen,
impl<N> Validate for ImageGenBody<N>where
N: ImageGen,
Source§impl<'v_a, N> ValidateArgs<'v_a> for ImageGenBody<N>where
N: ImageGen,
impl<'v_a, N> ValidateArgs<'v_a> for ImageGenBody<N>where
N: ImageGen,
Auto Trait Implementations§
impl<N> Freeze for ImageGenBody<N>where
N: Freeze,
impl<N> RefUnwindSafe for ImageGenBody<N>where
N: RefUnwindSafe,
impl<N> Send for ImageGenBody<N>where
N: Send,
impl<N> Sync for ImageGenBody<N>where
N: Sync,
impl<N> Unpin for ImageGenBody<N>where
N: Unpin,
impl<N> UnsafeUnpin for ImageGenBody<N>where
N: UnsafeUnpin,
impl<N> UnwindSafe for ImageGenBody<N>where
N: UnwindSafe,
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