#[non_exhaustive]pub struct ModelEntry {
pub model: String,
pub max_questions: u64,
pub max_items: u64,
pub context_tokens: Option<u64>,
pub images: Option<ImageSupport>,
pub price: Option<Price>,
pub egress_host: String,
}Expand description
One served model.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.model: StringThe catalog id, <provider>/<model>.
max_questions: u64Most questions in one batch: the tighter of the catalog’s and the module’s limits.
max_items: u64Most items in one batch: the tighter of the catalog’s and the
module’s limits, so never above limits.max_items.
context_tokens: Option<u64>The model’s context, in tokens, from the catalog. The provider
truncates state beyond it without saying so. Absent when the catalog
states no exact figure (a provider that says only “64k” gets no
guessed number); absent is not zero.
images: Option<ImageSupport>The model’s image support; null when it takes no images. Always
encoded, never omitted, so “no images” is stated rather than implied.
price: Option<Price>The catalog price; absent when the model is unpriced.
egress_host: StringThe provider host item text is sent to, e.g. api.typesafe.ai.
Implementations§
Source§impl ModelEntry
impl ModelEntry
Sourcepub fn new(
model: impl Into<String>,
max_questions: u64,
max_items: u64,
context_tokens: impl Into<Option<u64>>,
egress_host: impl Into<String>,
) -> Self
pub fn new( model: impl Into<String>, max_questions: u64, max_items: u64, context_tokens: impl Into<Option<u64>>, egress_host: impl Into<String>, ) -> Self
context_tokens takes a number, or None when the catalog states
no exact figure.