pub struct InferenceProfile {
pub name: String,
pub description: Option<String>,
pub config: InferenceConfig,
pub list_in_models: bool,
}Expand description
A named sampling profile applied on top of a model’s own defaults.
Fields§
§name: StringProfile slug, used as the :{suffix} on a model id.
Constrained by validate_name to lowercase alphanumerics and -.
description: Option<String>Human-readable summary, surfaced in /v1/models and the settings UI.
config: InferenceConfigThe sampling overrides. Sparse — see the module docs.
list_in_models: boolWhether to advertise {model}:{name} as its own /v1/models entry.
Off by default: with several models and several profiles the full cross product would swamp a client’s model picker. Users opt in for the one or two profiles they switch between often; the rest stay addressable by name without appearing in the list.
Implementations§
Source§impl InferenceProfile
impl InferenceProfile
Sourcepub fn validate(&self) -> Result<(), ProfileNameError>
pub fn validate(&self) -> Result<(), ProfileNameError>
Trait Implementations§
Source§impl Clone for InferenceProfile
impl Clone for InferenceProfile
Source§fn clone(&self) -> InferenceProfile
fn clone(&self) -> InferenceProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InferenceProfile
impl Debug for InferenceProfile
Source§impl<'de> Deserialize<'de> for InferenceProfile
impl<'de> Deserialize<'de> for InferenceProfile
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 PartialEq for InferenceProfile
impl PartialEq for InferenceProfile
Source§fn eq(&self, other: &InferenceProfile) -> bool
fn eq(&self, other: &InferenceProfile) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InferenceProfile
impl Serialize for InferenceProfile
impl StructuralPartialEq for InferenceProfile
Auto Trait Implementations§
impl Freeze for InferenceProfile
impl RefUnwindSafe for InferenceProfile
impl Send for InferenceProfile
impl Sync for InferenceProfile
impl Unpin for InferenceProfile
impl UnsafeUnpin for InferenceProfile
impl UnwindSafe for InferenceProfile
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