pub enum ReasoningText {
Plain {
text: String,
},
Summary {
parts: Vec<String>,
},
Redacted,
}Expand description
Readable reasoning text, in the form the provider actually exposes.
Providers differ in what they are willing to show, and collapsing that difference loses the one thing a consumer needs to know: whether it is looking at the model’s own words or a curated gloss of them.
Variants§
Plain
Verbatim chain-of-thought exposed by the provider (Anthropic extended
thinking, Gemini thought parts, Chat Completions reasoning_content).
Summary
Provider-curated summary segments, not raw chain-of-thought (OpenAI
Responses summary_text). Safe to display; never the model’s own words.
Redacted
The provider withheld the content (Anthropic redacted_thinking). The
artifact must still be replayed verbatim, so the part keeps its
signature/encrypted payload while carrying no readable text.
Implementations§
Source§impl ReasoningText
impl ReasoningText
Sourcepub fn display_text(&self) -> Option<String>
pub fn display_text(&self) -> Option<String>
Text safe to render on a reasoning channel, if any.
Sourcepub fn is_raw_chain_of_thought(&self) -> bool
pub fn is_raw_chain_of_thought(&self) -> bool
Whether this is raw chain-of-thought rather than a curated summary.
Trait Implementations§
Source§impl Clone for ReasoningText
impl Clone for ReasoningText
Source§fn clone(&self) -> ReasoningText
fn clone(&self) -> ReasoningText
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more