Class: OpenAI::Models::Beta::AgentCreateParams::Compaction

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/agent_create_params.rb,
sig/openai/models/beta/agent_create_params.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_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(model:, compaction: nil, experimental: nil, instructions: nil, metadata: nil, multi_agent: nil, name: nil, reasoning: nil, service_tier: nil, text: nil, tools: nil, request_options: {}) ⇒ Compaction

Returns a new instance of Compaction.

Parameters:

  • async —

    Whether to compact context in the background. Omission or null defaults to false. Set to true to enable background compaction. Background compaction may increase token usage.

  • async: (Boolean, nil)


127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/openai/models/beta/agent_create_params.rb', line 127

class Compaction < OpenAI::Internal::Type::BaseModel
  # @!attribute async
  #   Whether to compact context in the background. Omission or null defaults to
  #   false. Set to true to enable background compaction. Background compaction may
  #   increase token usage.
  #
  #   @return [Boolean, nil]
  optional :async, OpenAI::Internal::Type::Boolean, nil?: true

  # @!method initialize(async: nil)
  #   Context compaction settings. Omission or null uses blocking compaction.
  #
  #   @param async [Boolean, nil]
  #     Whether to compact context in the background. Omission or null defaults to
  #     false. Set to true to enable background compaction. Background compaction may
  #     increase token usage.
end

Instance Attribute Details

#async ⇒ Boolean?

Whether to compact context in the background. Omission or null defaults to false. Set to true to enable background compaction. Background compaction may increase token usage.

Returns:



134
# File 'lib/openai/models/beta/agent_create_params.rb', line 134

optional :async, OpenAI::Internal::Type::Boolean, nil?: true

Instance Method Details

#to_hash ⇒ { ?async: bool? }

Returns:

  • ({ ?async: bool? })


138
# File 'sig/openai/models/beta/agent_create_params.rbs', line 138

def to_hash: -> { ?async: bool? }