pub struct ImageCreateParameters {
pub prompt: String,
pub num_images: Option<i32>,
pub image_size: Option<String>,
pub response_format: Option<String>,
pub user: Option<String>,
}
Fields§
§prompt: String
§num_images: Option<i32>
The number of images to generate. Must be between 1 and 10.
image_size: Option<String>
The size of the generated images. Must be one of 256x256
, 512x512
, or `1024x1024.
response_format: Option<String>
The format in which the generated images are returned. Must be one of url
or b64_json
.
user: Option<String>
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Implementations§
Source§impl ImageCreateParameters
impl ImageCreateParameters
pub fn new(prompt: String) -> Self
pub fn num_images(self, num_images: i32) -> Self
pub fn image_size(self, image_size: String) -> Self
pub fn response_format(self, response_format: String) -> Self
pub fn user(self, user: String) -> Self
pub fn build(self) -> ImageCreateParameters
Trait Implementations§
Source§impl Debug for ImageCreateParameters
impl Debug for ImageCreateParameters
Source§impl<'de> Deserialize<'de> for ImageCreateParameters
impl<'de> Deserialize<'de> for ImageCreateParameters
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 ImageCreateParameters
impl RefUnwindSafe for ImageCreateParameters
impl Send for ImageCreateParameters
impl Sync for ImageCreateParameters
impl Unpin for ImageCreateParameters
impl UnwindSafe for ImageCreateParameters
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