Omni.Content.Thinking (Omni v2.0.0)

Copy Markdown View Source

A thinking content block: the model's reasoning before it answers.

Only a model produces these. Keep them in the conversation: Omni sends them back to the provider that wrote them, which models need to continue their reasoning across tool use (see Thinking).

Struct fields

  • :text - the reasoning, or a summary of it. nil when the provider returns it encrypted
  • :redacted_data - encrypted reasoning, which can be sent back but not read. :text is nil when this is set
  • :signature - a token the provider uses to check the block when it is sent back
  • :id - the block's id, for APIs that refer to reasoning by id (OpenAI Responses)

Summary

Types

t()

Chain-of-thought reasoning. text is nil when the content is redacted.

Functions

Creates a new thinking content block from a keyword list or map.

Types

t()

@type t() :: %Omni.Content.Thinking{
  id: String.t() | nil,
  redacted_data: String.t() | nil,
  signature: String.t() | nil,
  text: String.t() | nil
}

Chain-of-thought reasoning. text is nil when the content is redacted.

Functions

new(attrs)

@spec new(Enumerable.t()) :: t()

Creates a new thinking content block from a keyword list or map.