View Source LangChain.ChatModels.ReasoningOptions (LangChain v0.4.0)

Embedded schema for OpenAI reasoning configuration options.

Used with gpt-5 and o-series models only.

Fields

  • effort - Constrains effort on reasoning. Supported values: :minimal, :low, :medium, :high
  • generate_summary - (Deprecated) A summary of the reasoning performed. Use summary instead.
  • summary - A summary of the reasoning performed. Supported values: :auto, :concise, :detailed

Summary

Functions

Creates a changeset for ReasoningOptions.

Creates a new ReasoningOptions struct.

Creates a new ReasoningOptions struct, raising on error.

Converts the ReasoningOptions to a map suitable for API requests. Returns nil if no options are set.

Returns the list of valid effort values.

Returns the list of valid summary values.

Types

@type t() :: %LangChain.ChatModels.ReasoningOptions{
  effort: term(),
  generate_summary: term(),
  summary: term()
}

Functions

Link to this function

changeset(reasoning, attrs)

View Source
@spec changeset(t(), map()) :: Ecto.Changeset.t()

Creates a changeset for ReasoningOptions.

@spec new(map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Creates a new ReasoningOptions struct.

@spec new!(map()) :: t() | no_return()

Creates a new ReasoningOptions struct, raising on error.

@spec to_api_map(t() | nil) :: map() | nil

Converts the ReasoningOptions to a map suitable for API requests. Returns nil if no options are set.

Returns the list of valid effort values.

Returns the list of valid summary values.