pub struct Model {
pub capabilities: Vec<ModelCapability>,
pub context_window: i32,
pub deprecated: bool,
pub deprecation_message: String,
pub description: String,
pub display_name: String,
pub input_cost_per_million_cents: u64,
pub max_output_tokens: i32,
pub model_id: ModelId,
pub output_cost_per_million_cents: u64,
pub provider: ProviderId,
pub training_cutoff: String,
}Expand description
Model
JSON schema
{
"type": "object",
"required": [
"capabilities",
"context_window",
"deprecated",
"deprecation_message",
"description",
"display_name",
"input_cost_per_million_cents",
"max_output_tokens",
"model_id",
"output_cost_per_million_cents",
"provider",
"training_cutoff"
],
"properties": {
"capabilities": {
"type": "array",
"items": {
"$ref": "#/$defs/ModelCapability"
}
},
"context_window": {
"type": "integer",
"format": "int32",
"minimum": 0.0
},
"deprecated": {
"type": "boolean"
},
"deprecation_message": {
"type": "string"
},
"description": {
"type": "string"
},
"display_name": {
"type": "string"
},
"input_cost_per_million_cents": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"max_output_tokens": {
"type": "integer",
"format": "int32",
"minimum": 0.0
},
"model_id": {
"$ref": "#/$defs/ModelId"
},
"output_cost_per_million_cents": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"provider": {
"$ref": "#/$defs/ProviderId"
},
"training_cutoff": {
"description": "Training cutoff in YYYY-MM format",
"type": "string"
}
}
}Fields§
§capabilities: Vec<ModelCapability>§context_window: i32§deprecated: bool§deprecation_message: String§description: String§display_name: String§input_cost_per_million_cents: u64§max_output_tokens: i32§model_id: ModelId§output_cost_per_million_cents: u64§provider: ProviderId§training_cutoff: StringTraining cutoff in YYYY-MM format
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Model
impl<'de> Deserialize<'de> for Model
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
Source§impl From<Model> for ModelRelayApi
impl From<Model> for ModelRelayApi
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnwindSafe for Model
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