pub struct ImageGenerationResponse {
pub image: Vec<u8>,
pub usage: Usage,
pub provider: String,
pub model: Option<String>,
pub response_id: Option<String>,
pub provider_request_id: Option<String>,
pub raw: Value,
}image only.Expand description
Generated image bytes and normalized provider metadata.
Fields§
§image: Vec<u8>The generated image, decoded to bytes.
usage: UsageUsage as the provider reported it; every counter is None when the
provider reported none (see Usage).
provider: StringStable descriptor name of the provider that produced this response,
for example "openai". Always populated.
model: Option<String>Provider-reported model identifier, when the wire response named one.
response_id: Option<String>Provider-assigned response-scoped identifier, when reported.
provider_request_id: Option<String>Transport request ID from HTTP headers, or None when unreported.
raw: ValueProvider response metadata. May be null for byte-only responses or
responses constructed without metadata; image bytes remain in Self::image.
Implementations§
Source§impl ImageGenerationResponse
impl ImageGenerationResponse
Sourcepub fn new(image: Vec<u8>) -> ImageGenerationResponse
pub fn new(image: Vec<u8>) -> ImageGenerationResponse
A response carrying image. The driver writes the provider, the
transport request id and the reply document; decoders set what the
provider reported.
Trait Implementations§
Source§impl Clone for ImageGenerationResponse
impl Clone for ImageGenerationResponse
Source§fn clone(&self) -> ImageGenerationResponse
fn clone(&self) -> ImageGenerationResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more