pub struct Image {
pub b64_json: Option<String>,
pub revised_prompt: Option<String>,
pub url: Option<String>,
}Expand description
Represents the content or the URL of an image generated by the OpenAI API.
Fields§
§b64_json: Option<String>The base64-encoded JSON of the generated image.
Returned by default for the GPT image models, and only present if
response_format is set to b64_json for dall-e-2 and dall-e-3.
revised_prompt: Option<String>For dall-e-3 only, the revised prompt that was used to generate the
image.
url: Option<String>When using dall-e-2 or dall-e-3, the URL of the generated image
if response_format is set to url (default value). Unsupported for
the GPT image models.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Image
impl<'de> Deserialize<'de> for Image
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 Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnsafeUnpin for Image
impl UnwindSafe for Image
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