Sycophant.Message.Content.Thinking (sycophant v0.4.2)

Copy Markdown

Thinking content part for assistant messages with extended reasoning.

Represents chain-of-thought produced by the model when reasoning/thinking is enabled. The :text field holds the raw reasoning text (Anthropic, Gemini, OpenAI reasoning_text). The :summary field holds a condensed summary when the provider supports it (OpenAI summary_text).

The optional :signature field carries a verification token (used by Anthropic and AWS Bedrock) that must be passed back unmodified in multi-turn conversations.

Examples

iex> %Sycophant.Message.Content.Thinking{text: "Let me think about this..."}
#Sycophant.Message.Content.Thinking<"Let me think about this...">

Summary

Functions

Deserializes a thinking content part from a plain map.

Types

t()

@type t() :: %Sycophant.Message.Content.Thinking{
  id: String.t() | nil,
  signature: String.t() | nil,
  summary: String.t() | nil,
  text: String.t() | nil
}

Functions

from_map(data)

@spec from_map(map()) :: t()

Deserializes a thinking content part from a plain map.