Class: OpenAI::Models::Beta::BetaResponseInputItem::CompactionTrigger

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

Defined Under Namespace

Classes: Agent

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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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: nil, agent: nil, type: :compaction_trigger) ⇒ CompactionTrigger

Returns a new instance of CompactionTrigger.

Parameters:

  • id (defaults to: nil) —

    The unique ID of this compaction trigger.

  • agent (defaults to: nil) —

    The agent that produced this item.

  • type (defaults to: :compaction_trigger) —

    The type of the item. Always compaction_trigger.

  • id: (String, nil) (defaults to: nil)
  • agent: (OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent, nil) (defaults to: nil)
  • type: (:compaction_trigger) (defaults to: :compaction_trigger)


# File 'lib/openai/models/beta/beta_response_input_item.rb', line 3140


Instance Attribute Details

#agent ⇒ OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent?

The agent that produced this item.

Returns:

  • (OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent, nil)


3138
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 3138

optional :agent, -> { OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent }, nil?: true

#id ⇒ String?

The unique ID of this compaction trigger.

Returns:

  • (String, nil)


3132
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 3132

optional :id, String, nil?: true

#type ⇒ :compaction_trigger

The type of the item. Always compaction_trigger.

Returns:

  • (:compaction_trigger)


3126
# File 'lib/openai/models/beta/beta_response_input_item.rb', line 3126

required :type, const: :compaction_trigger

Instance Method Details

#to_hash ⇒ { ?type: :compaction_trigger, ?id: String?, ?agent: OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent? }

Returns:

  • ({ ?type: :compaction_trigger, ?id: String?, ?agent: OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent? })


2833
2834
2835
2836
2837
# File 'sig/openai/models/beta/beta_response_input_item.rbs', line 2833

def to_hash: -> {
  ?type: :compaction_trigger,
  ?id: String?,
  ?agent: OpenAI::Beta::BetaResponseInputItem::CompactionTrigger::Agent?
}