Skip to main content

thought_message

Function thought_message 

Source
pub fn thought_message(reasoning: &str) -> Message
Expand description

Build a model-role Message carrying model reasoning as a ThoughtContent, NOT as answer text.

The reasoning rides one ThoughtSummaryContent text part. Renders downstream as a collapsed “thinking” line (TUI LineKind::Thought) and is kept out of the assistant’s reply. Used for providers that stream reasoning separately (e.g. z.ai GLM’s reasoning_content). The control plane prunes reasoning from the replayed prompt (it is never replayed to the provider).