Class: OpenAI::Models::Beta::BetaResponseCompactionItem

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

Defined Under Namespace

Classes: Agent

Instance Attribute 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(id:, encrypted_content:, agent: nil, created_by: nil, type: :compaction) ⇒ Object

A compaction item generated by the v1/responses/compact API.

Parameters:

  • id (String)

    The unique ID of the compaction item.

  • encrypted_content (String)

    The encrypted content that was produced by compaction.

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

    The agent that produced this item.

  • created_by (String) (defaults to: nil)

    The identifier of the actor that created the item.

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

    The type of the item. Always compaction.



# File 'lib/openai/models/beta/beta_response_compaction_item.rb', line 37

Instance Attribute Details

#agentOpenAI::Models::Beta::BetaResponseCompactionItem::Agent?

The agent that produced this item.



29
# File 'lib/openai/models/beta/beta_response_compaction_item.rb', line 29

optional :agent, -> { OpenAI::Beta::BetaResponseCompactionItem::Agent }

#created_byString?

The identifier of the actor that created the item.

Parameters:

  • (String)

Returns:

  • (String, nil)


35
# File 'lib/openai/models/beta/beta_response_compaction_item.rb', line 35

optional :created_by, String

#encrypted_contentString

The encrypted content that was produced by compaction.

Parameters:

  • value (String)

Returns:

  • (String)


17
# File 'lib/openai/models/beta/beta_response_compaction_item.rb', line 17

required :encrypted_content, String

#idString

The unique ID of the compaction item.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/openai/models/beta/beta_response_compaction_item.rb', line 11

required :id, String

#typeSymbol, :compaction

The type of the item. Always compaction.

Parameters:

  • value (:compaction)

Returns:

  • (Symbol, :compaction)


23
# File 'lib/openai/models/beta/beta_response_compaction_item.rb', line 23

required :type, const: :compaction

Instance Method Details

#to_hash{

Returns:

  • ({)


40
# File 'sig/openai/models/beta/beta_response_compaction_item.rbs', line 40

def to_hash: -> {