Class: OpenAI::Models::Beta::BetaResponse::Reasoning

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/beta_response.rb,
sig/openai/models/beta/beta_response.rbs

Overview

See Also:

  • OpenAI::Models::Beta::BetaResponse#reasoning

Defined Under Namespace

Modules: Context, Effort, GenerateSummary, Mode, Summary

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(context: nil, effort: nil, generate_summary: nil, mode: nil, summary: nil) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Beta::BetaResponse::Reasoning for more details.

gpt-5 and o-series models only

Configuration options for reasoning models.

Parameters:



# File 'lib/openai/models/beta/beta_response.rb', line 1244

Instance Attribute Details

#contextSymbol, ...

Controls which reasoning items are rendered back to the model on later turns. When returned on a response, this is the effective reasoning context mode used for the response.

Parameters:

  • value (OpenAI::Models::Beta::BetaResponse::Reasoning::context, nil)

Returns:



1198
# File 'lib/openai/models/beta/beta_response.rb', line 1198

optional :context, enum: -> { OpenAI::Beta::BetaResponse::Reasoning::Context }, nil?: true

#effortSymbol, ...

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.

Parameters:

  • value (OpenAI::Models::Beta::BetaResponse::Reasoning::effort, nil)

Returns:



1209
# File 'lib/openai/models/beta/beta_response.rb', line 1209

optional :effort, enum: -> { OpenAI::Beta::BetaResponse::Reasoning::Effort }, nil?: true

#generate_summarySymbol, ...

Deprecated.

Deprecated: use summary instead.

A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.

Parameters:

  • value (OpenAI::Models::Beta::BetaResponse::Reasoning::generate_summary, nil)

Returns:



1221
1222
1223
# File 'lib/openai/models/beta/beta_response.rb', line 1221

optional :generate_summary,
enum: -> { OpenAI::Beta::BetaResponse::Reasoning::GenerateSummary },
nil?: true

#modeString, ...

Controls the reasoning execution mode for the request.

When returned on a response, this is the effective execution mode.

Returns:



1231
# File 'lib/openai/models/beta/beta_response.rb', line 1231

optional :mode, union: -> { OpenAI::Beta::BetaResponse::Reasoning::Mode }

#summarySymbol, ...

A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.

concise is supported for computer-use-preview models and all reasoning models after gpt-5.

Parameters:

  • value (OpenAI::Models::Beta::BetaResponse::Reasoning::summary, nil)

Returns:



1242
# File 'lib/openai/models/beta/beta_response.rb', line 1242

optional :summary, enum: -> { OpenAI::Beta::BetaResponse::Reasoning::Summary }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/beta_response.rb', line 1275

Instance Method Details

#to_hash{

Returns:

  • ({)


760
# File 'sig/openai/models/beta/beta_response.rbs', line 760

def to_hash: -> {