Class: OpenAI::Models::Responses::CompactedResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Responses::CompactedResponse
- Defined in:
- lib/openai/models/responses/compacted_response.rb,
sig/openai/models/responses/compacted_response.rbs
Overview
Instance Attribute Summary collapse
-
#created_at ⇒ Integer
Unix timestamp (in seconds) when the compacted conversation was created.
-
#id ⇒ String
The unique identifier for the compacted response.
-
#object ⇒ :"response.compaction"
The object type.
-
#output ⇒ ::Array[OpenAI::Models::Responses::response_output_item]
The compacted list of output items.
-
#usage ⇒ OpenAI::Responses::ResponseUsage
Token accounting for the compaction pass, including cached, reasoning, and total tokens.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
- #initialize(id:, created_at:, output:, usage:, object: :"response.compaction") ⇒ Object constructor
- #to_hash ⇒ {
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:, created_at:, output:, usage:, object: :"response.compaction") ⇒ Object
|
|
# File 'lib/openai/models/responses/compacted_response.rb', line 40
|
Instance Attribute Details
#created_at ⇒ Integer
Unix timestamp (in seconds) when the compacted conversation was created.
18 |
# File 'lib/openai/models/responses/compacted_response.rb', line 18 required :created_at, Integer |
#id ⇒ String
The unique identifier for the compacted response.
12 |
# File 'lib/openai/models/responses/compacted_response.rb', line 12 required :id, String |
#object ⇒ :"response.compaction"
The object type. Always response.compaction.
24 |
# File 'lib/openai/models/responses/compacted_response.rb', line 24 required :object, const: :"response.compaction" |
#output ⇒ ::Array[OpenAI::Models::Responses::response_output_item]
The compacted list of output items. This is a list of all user messages, followed by a single compaction item.
31 |
# File 'lib/openai/models/responses/compacted_response.rb', line 31 required :output, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::ResponseOutputItem] } |
#usage ⇒ OpenAI::Responses::ResponseUsage
Token accounting for the compaction pass, including cached, reasoning, and total tokens.
38 |
# File 'lib/openai/models/responses/compacted_response.rb', line 38 required :usage, -> { OpenAI::Responses::ResponseUsage } |
Instance Method Details
#to_hash ⇒ {
51 |
# File 'sig/openai/models/responses/compacted_response.rbs', line 51
def to_hash: -> {
|