pub struct Thinking {
pub type_: ThinkingType,
pub clear_thinking: Option<bool>,
}Expand description
Controls the switch between thinking and non-thinking mode.
Shared by DeepSeek and Z.ai / 智谱 GLM, which use the same thinking
key and the same type values; GLM additionally supports the
clear_thinking flag. Gated on any(deepseek, zai) so enabling either
provider feature makes the field available, and enabling both never
emits the thinking key twice.
Fields§
§type_: ThinkingTypeWhether to use thinking mode (enabled) or non-thinking mode
(disabled). Defaults to enabled.
clear_thinking: Option<bool>Z.ai / GLM: whether to clear the previous turn’s reasoning_content
from the context (true, GLM’s default) or preserve it (false).
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.