Class: OpenAI::Models::Beta::BetaResponseReasoningItem::Summary

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

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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(id:, summary:, agent: nil, content: nil, encrypted_content: nil, status: nil, type: :reasoning) ⇒ Summary

A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your input to the Responses API for subsequent turns of a conversation if you are manually managing context.

Parameters:

  • id (String)

    The unique identifier of the reasoning content.

  • summary (Array<OpenAI::Models::Beta::BetaResponseReasoningItem::Summary>)

    Reasoning summary content.

  • agent (OpenAI::Models::Beta::BetaResponseReasoningItem::Agent, nil) (defaults to: nil)

    The agent that produced this item.

  • content (Array<OpenAI::Models::Beta::BetaResponseReasoningItem::Content>) (defaults to: nil)

    Reasoning text content.

  • encrypted_content (String, nil) (defaults to: nil)

    The encrypted content of the reasoning item. This is populated by default for reasoning items returned by POST /v1/responses and WebSocket response.create requests.

    When streaming, use the completed reasoning item and its encrypted_content from the response.output_item.done event in subsequent requests. The encrypted_content in response.output_item.added may be incomplete. This is especially important when store is false or when using Zero Data Retention.

  • status (Symbol, OpenAI::Models::Beta::BetaResponseReasoningItem::Status) (defaults to: nil)

    The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

  • type (Symbol, :reasoning) (defaults to: :reasoning)

    The type of the object. Always reasoning.

  • text: (String)
  • type: (:summary_text) (defaults to: :reasoning)


97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/openai/models/beta/beta_response_reasoning_item.rb', line 97

class Summary < OpenAI::Internal::Type::BaseModel
  # @!attribute text
  #   A summary of the reasoning output from the model so far.
  #
  #   @return [String]
  required :text, String

  # @!attribute type
  #   The type of the object. Always `summary_text`.
  #
  #   @return [Symbol, :summary_text]
  required :type, const: :summary_text

  # @!method initialize(text:, type: :summary_text)
  #   A summary text from the model.
  #
  #   @param text [String]
  #     A summary of the reasoning output from the model so far.
  #
  #   @param type [Symbol, :summary_text]
  #     The type of the object. Always `summary_text`.
end

Instance Attribute Details

#textString

A summary of the reasoning output from the model so far.

Parameters:

  • value (String)

Returns:

  • (String)


102
# File 'lib/openai/models/beta/beta_response_reasoning_item.rb', line 102

required :text, String

#typeSymbol, :summary_text

The type of the object. Always summary_text.

Parameters:

  • value (:summary_text)

Returns:

  • (Symbol, :summary_text)


108
# File 'lib/openai/models/beta/beta_response_reasoning_item.rb', line 108

required :type, const: :summary_text

Instance Method Details

#to_hash{ text: String, ?type: :summary_text }

Returns:

  • ({ text: String, ?type: :summary_text })


69
# File 'sig/openai/models/beta/beta_response_reasoning_item.rbs', line 69

def to_hash: -> { text: String, ?type: :summary_text }