pub struct ModelInfo {
pub id: String,
pub object: String,
pub created: Option<u64>,
pub owned_by: String,
pub permission: Vec<ModelPermission>,
pub root: Option<String>,
pub parent: Option<String>,
}
Expand description
Represents an OpenAI model (detailed info from API).
Note that some fields—like permission
, root
, and parent
—might not be returned by
all model objects. They are made optional (or defaulted) to avoid serde decoding errors.
Fields§
§id: String
The unique identifier for the model, e.g. "text-davinci-003"
.
object: String
The object type, usually "model"
.
created: Option<u64>
Unix timestamp (in seconds) when this model was created, if available.
owned_by: String
The owner of this model, often "openai"
or an organization ID.
permission: Vec<ModelPermission>
Some endpoints return a list of permission objects; others may omit it.
root: Option<String>
For certain models, a "root"
field may indicate the parent or root model.
parent: Option<String>
For certain models, a "parent"
field references the parent model.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelInfo
impl<'de> Deserialize<'de> for ModelInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModelInfo
impl RefUnwindSafe for ModelInfo
impl Send for ModelInfo
impl Sync for ModelInfo
impl Unpin for ModelInfo
impl UnwindSafe for ModelInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more