pub struct Model {
pub provider: String,
pub id: String,
pub name: Option<String>,
pub description: Option<String>,
pub context_window: Option<u32>,
pub supported_features: Vec<String>,
pub cost_input: Option<f64>,
pub cost_output: Option<f64>,
pub cost_cache_read: Option<f64>,
pub cost_cache_write: Option<f64>,
pub input_modalities: Vec<String>,
}Expand description
A discovered model
Fields§
§provider: String§id: String§name: Option<String>§description: Option<String>§context_window: Option<u32>§supported_features: Vec<String>§cost_input: Option<f64>§cost_output: Option<f64>§cost_cache_read: Option<f64>§cost_cache_write: Option<f64>§input_modalities: Vec<String>Implementations§
Source§impl Model
impl Model
Sourcepub fn from_entry(entry: &ModelEntry) -> Self
pub fn from_entry(entry: &ModelEntry) -> Self
Create from a model_db::ModelEntry
Sourcepub fn from_registry_model(model: &Model) -> Self
pub fn from_registry_model(model: &Model) -> Self
Create from a model_registry::Model
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more