Skip to main content

bitrouter_core/models/image/
generation_result.rs

1use http::HeaderMap;
2
3use crate::models::{
4    image::{file::ImageModelFileData, usage::ImageModelUsage},
5    shared::{
6        types::{Record, TimestampMillis},
7        warnings::Warning,
8    },
9};
10
11#[derive(Debug, Clone)]
12pub struct ImageModelGenerationResult {
13    pub images: Vec<ImageModelFileData>,
14    pub warnings: Option<Vec<Warning>>,
15    pub provider_metadata: Option<Record<String, ImageModelGenerationResultProviderMetadata>>,
16    pub response: ImageModelGenerationResultResponse,
17    pub usage: Option<ImageModelUsage>,
18}
19
20#[derive(Debug, Clone)]
21pub struct ImageModelGenerationResultProviderMetadata {
22    pub images: Vec<serde_json::Value>,
23    pub extra: Option<serde_json::Value>,
24}
25
26#[derive(Debug, Clone)]
27pub struct ImageModelGenerationResultResponse {
28    pub timestamp: TimestampMillis,
29    pub model_id: String,
30    pub headers: Option<HeaderMap>,
31}