openai-types 0.1.2

Typed OpenAI API models — zero dependencies beyond serde
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Manual: generic pagination type for list endpoints.

use serde::{Deserialize, Serialize};

/// Generic list response with cursor-based pagination.
///
/// Used by all list endpoints: models, files, batches, fine-tuning jobs, etc.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ListResponse<T> {
    pub object: String,
    pub data: Vec<T>,
    #[serde(default)]
    pub has_more: Option<bool>,
    #[serde(default)]
    pub first_id: Option<String>,
    #[serde(default)]
    pub last_id: Option<String>,
}