pub struct Image {
pub b64_json: Option<String>,
pub url: Option<String>,
pub revised_prompt: 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. Default value for gpt-image-1
, and only present if response_format
is set to b64_json
for dall-e-2
and dall-e-3
.
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 gpt-image-1
.
revised_prompt: Option<String>
For dall-e-3
only, the revised prompt that was used to generate the image.
Implementations§
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
impl StructuralPartialEq for Image
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin 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