async_openai_alt/types/
model.rs

1use serde::{Deserialize, Serialize};
2
3/// Describes an OpenAI model offering that can be used with the API.
4#[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
5pub struct Model {
6    /// The model identifier, which can be referenced in the API endpoints.
7    pub id: String,
8    /// The object type, which is always "model".
9    pub object: String,
10    /// The Unix timestamp (in seconds) when the model was created.
11    pub created: u32,
12    /// The organization that owns the model.
13    pub owned_by: String,
14}
15
16#[derive(Debug, Deserialize, Clone, PartialEq, Serialize)]
17pub struct ListModelResponse {
18    pub object: String,
19    pub data: Vec<Model>,
20}
21
22#[derive(Debug, Deserialize, Clone, PartialEq, Serialize)]
23pub struct DeleteModelResponse {
24    pub id: String,
25    pub object: String,
26    pub deleted: bool,
27}