pub enum ThinkingType {
Enabled,
Disabled,
}Expand description
Controls thinking/reasoning capabilities in AI models.
This enum determines whether a model should engage in step-by-step reasoning when processing requests. Thinking mode can improve accuracy for complex tasks but may increase response time and token usage.
§Variants
Enabled- Model performs explicit reasoning steps before respondingDisabled- Model responds directly without showing reasoning process
§Usage
let client = ChatCompletion::new(model, messages, api_key)
.with_thinking(ThinkingType::Enabled);§Model Compatibility
Thinking capabilities are available only on models that implement the
ThinkEnable trait, such as GLM-4.5 series models.
Variants§
Enabled
Enable thinking capabilities for enhanced reasoning.
When enabled, the model will show its reasoning process step-by-step, which can improve accuracy for complex logical or analytical tasks.
Disabled
Disable thinking capabilities for direct responses.
When disabled, the model responds directly without showing intermediate reasoning steps, resulting in faster responses and lower token usage.
Trait Implementations§
Source§impl Clone for ThinkingType
impl Clone for ThinkingType
Source§fn clone(&self) -> ThinkingType
fn clone(&self) -> ThinkingType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more