Class: OpenAI::Models::Beta::ResponseCreateParams::ContextManagement

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

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(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {}) ⇒ ContextManagement

Some parameter documentations has been truncated, see OpenAI::Models::Beta::ResponseCreateParams for more details.

Parameters:



431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/openai/models/beta/response_create_params.rb', line 431

class ContextManagement < OpenAI::Internal::Type::BaseModel
  # @!attribute type
  #   The context management entry type. Currently only 'compaction' is supported.
  #
  #   @return [String]
  required :type, String

  # @!attribute compact_threshold
  #   Token threshold at which compaction should be triggered for this entry.
  #
  #   @return [Integer, nil]
  optional :compact_threshold, Integer, nil?: true

  # @!method initialize(type:, compact_threshold: nil)
  #   @param type [String] The context management entry type. Currently only 'compaction' is supported.
  #
  #   @param compact_threshold [Integer, nil] Token threshold at which compaction should be triggered for this entry.
end

Instance Attribute Details

#compact_thresholdInteger?

Token threshold at which compaction should be triggered for this entry.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


442
# File 'lib/openai/models/beta/response_create_params.rb', line 442

optional :compact_threshold, Integer, nil?: true

#typeString

The context management entry type. Currently only 'compaction' is supported.

Parameters:

  • value (String)

Returns:

  • (String)


436
# File 'lib/openai/models/beta/response_create_params.rb', line 436

required :type, String

Instance Method Details

#to_hash{ type: String, compact_threshold: Integer? }

Returns:

  • ({ type: String, compact_threshold: Integer? })


224
# File 'sig/openai/models/beta/response_create_params.rbs', line 224

def to_hash: -> { type: String, compact_threshold: Integer? }