#[non_exhaustive]pub enum Thinking {
Unset,
Off,
On(Effort),
}Expand description
Whether the model should reason before answering.
Three states rather than a bool, and the third is the one that matters. On some models reasoning is on by default and on others it is off, so collapsing “no opinion” into “off” silently changes behaviour the moment a model id changes.
Whether a model can reason is a different question, answered by
crate::ModelCapabilities::thinking. It is deliberately not a variant here: a request
says what you want, a capability says what is possible, and one enum carrying both would
be two answers to two questions in one place.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unset
No opinion. Whatever the model does by default.
Off
Do not reason.
On(Effort)
Reason at this level.
Trait Implementations§
impl Copy for Thinking
Source§impl<'de> Deserialize<'de> for Thinking
impl<'de> Deserialize<'de> for Thinking
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
impl Eq for Thinking
impl StructuralPartialEq for Thinking
Auto Trait Implementations§
impl Freeze for Thinking
impl RefUnwindSafe for Thinking
impl Send for Thinking
impl Sync for Thinking
impl Unpin for Thinking
impl UnsafeUnpin for Thinking
impl UnwindSafe for Thinking
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