pub enum SamplingLayer {
Request,
Profile,
ModelUserSet,
Global,
ModelAutoDetected,
}Expand description
The five rungs of the ladder
resolve_with_profile
builds, in priority order.
Only one of ModelUserSet and
ModelAutoDetected is ever populated for a
given model — both name Model.inference_defaults, and
DefaultsOrigin decides which rung it
occupies.
Variants§
Request
Caller-supplied overrides — request parameters or CLI flags.
Profile
The named profile the caller selected.
ModelUserSet
Per-model defaults a person tuned deliberately.
Global
Global settings defaults.
ModelAutoDetected
Per-model defaults written automatically from the model’s reasoning
tag and never reviewed, so they rank below global settings.
Implementations§
Source§impl SamplingLayer
impl SamplingLayer
Sourcepub const fn from_index(index: usize) -> Option<Self>
pub const fn from_index(index: usize) -> Option<Self>
The rung at index in the ladder resolve_with_profile builds.
The mapping lives here rather than at each call site so a change to the
ladder’s order cannot silently mislabel a ParamSource::Layer.
Trait Implementations§
Source§impl Clone for SamplingLayer
impl Clone for SamplingLayer
Source§fn clone(&self) -> SamplingLayer
fn clone(&self) -> SamplingLayer
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 SamplingLayer
impl Debug for SamplingLayer
Source§impl<'de> Deserialize<'de> for SamplingLayer
impl<'de> Deserialize<'de> for SamplingLayer
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 SamplingLayer
impl PartialEq for SamplingLayer
Source§fn eq(&self, other: &SamplingLayer) -> bool
fn eq(&self, other: &SamplingLayer) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SamplingLayer
impl Serialize for SamplingLayer
impl Copy for SamplingLayer
impl Eq for SamplingLayer
impl StructuralPartialEq for SamplingLayer
Auto Trait Implementations§
impl Freeze for SamplingLayer
impl RefUnwindSafe for SamplingLayer
impl Send for SamplingLayer
impl Sync for SamplingLayer
impl Unpin for SamplingLayer
impl UnsafeUnpin for SamplingLayer
impl UnwindSafe for SamplingLayer
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