pub struct ReasoningProfile { /* private fields */ }Expand description
Validated provider-neutral reasoning levels supported by one model.
Implementations§
Source§impl ReasoningProfile
impl ReasoningProfile
Sourcepub fn new(
default_effort: ReasoningEffort,
supported_efforts: impl IntoIterator<Item = ReasoningEffort>,
) -> Result<Self, ModelSpecError>
pub fn new( default_effort: ReasoningEffort, supported_efforts: impl IntoIterator<Item = ReasoningEffort>, ) -> Result<Self, ModelSpecError>
Creates a profile with a supported default and unique effort levels.
§Errors
Returns an error when no levels are supplied, a level is duplicated, or the default level is not supported.
Sourcepub const fn default_effort(&self) -> ReasoningEffort
pub const fn default_effort(&self) -> ReasoningEffort
Returns the model default when a session has no explicit selection.
Sourcepub fn supported_efforts(&self) -> &[ReasoningEffort]
pub fn supported_efforts(&self) -> &[ReasoningEffort]
Returns supported levels in canonical ascending order.
Sourcepub fn resolve(&self, requested: ReasoningEffort) -> ReasoningResolution
pub fn resolve(&self, requested: ReasoningEffort) -> ReasoningResolution
Resolves one requested level using Pi’s upward-first clamp rule.
Trait Implementations§
Source§impl Clone for ReasoningProfile
impl Clone for ReasoningProfile
Source§fn clone(&self) -> ReasoningProfile
fn clone(&self) -> ReasoningProfile
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 ReasoningProfile
impl Debug for ReasoningProfile
impl Eq for ReasoningProfile
Source§impl PartialEq for ReasoningProfile
impl PartialEq for ReasoningProfile
impl StructuralPartialEq for ReasoningProfile
Auto Trait Implementations§
impl Freeze for ReasoningProfile
impl RefUnwindSafe for ReasoningProfile
impl Send for ReasoningProfile
impl Sync for ReasoningProfile
impl Unpin for ReasoningProfile
impl UnsafeUnpin for ReasoningProfile
impl UnwindSafe for ReasoningProfile
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