Skip to main content

openai_types/model/
_gen.rs

1// AUTO-GENERATED by py2rust — do not edit.
2// Re-generate: python3 scripts/py2rust.py sync <python_dir> <rust_dir>
3// Domain: model
4
5use serde::{Deserialize, Serialize};
6
7/// Describes an OpenAI model offering that can be used with the API.
8#[derive(Debug, Clone, Serialize, Deserialize)]
9#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
10pub struct Model {
11    /// The model identifier, which can be referenced in the API endpoints.
12    pub id: String,
13    /// The Unix timestamp (in seconds) when the model was created.
14    pub created: i64,
15    /// The object type, which is always "model".
16    pub object: String,
17    /// The organization that owns the model.
18    pub owned_by: String,
19}
20
21#[derive(Debug, Clone, Serialize, Deserialize)]
22#[cfg_attr(feature = "structured", derive(schemars::JsonSchema))]
23pub struct ModelDeleted {
24    pub id: String,
25    pub deleted: bool,
26    pub object: String,
27}