Class: Anthropic::Models::Beta::BetaCompact20260112Edit

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_compact_20260112_edit.rb,
sig/anthropic/models/beta/beta_compact_20260112_edit.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 ⇒ BetaCompact20260112Edit

Returns a new instance of BetaCompact20260112Edit.

Parameters:

  • instructions: (String, nil)
  • pause_after_compaction: (Boolean)
  • trigger: (Anthropic::Beta::BetaInputTokensTrigger, nil)
  • type: (:compact_20260112)


25
26
27
28
29
30
# File 'sig/anthropic/models/beta/beta_compact_20260112_edit.rbs', line 25

def initialize: (
  ?instructions: String?,
  ?pause_after_compaction: bool,
  ?trigger: Anthropic::Beta::BetaInputTokensTrigger?,
  ?type: :compact_20260112
) -> void

Instance Attribute Details

#instructions ⇒ String?

Additional instructions for summarization.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


16
# File 'lib/anthropic/models/beta/beta_compact_20260112_edit.rb', line 16

optional :instructions, String, nil?: true

#pause_after_compaction ⇒ Boolean?

Whether to pause after compaction and return the compaction block to the user.

Parameters:

Returns:



22
# File 'lib/anthropic/models/beta/beta_compact_20260112_edit.rb', line 22

optional :pause_after_compaction, Anthropic::Internal::Type::Boolean

#trigger ⇒ Anthropic::Models::Beta::BetaInputTokensTrigger?

When to trigger compaction. Defaults to 150000 input tokens.

Parameters:

  • value (Anthropic::Beta::BetaInputTokensTrigger, nil)

Returns:



28
# File 'lib/anthropic/models/beta/beta_compact_20260112_edit.rb', line 28

optional :trigger, -> { Anthropic::Beta::BetaInputTokensTrigger }, nil?: true

#type ⇒ Symbol, :compact_20260112

Parameters:

  • value (:compact_20260112)

Returns:

  • (Symbol, :compact_20260112)


10
# File 'lib/anthropic/models/beta/beta_compact_20260112_edit.rb', line 10

required :type, const: :compact_20260112

Instance Method Details

#to_hash ⇒ { type: :compact_20260112, instructions: String?, pause_after_compaction: bool, trigger: Anthropic::Beta::BetaInputTokensTrigger? }

Returns:

  • ({ type: :compact_20260112, instructions: String?, pause_after_compaction: bool, trigger: Anthropic::Beta::BetaInputTokensTrigger? })


32
33
34
35
36
37
# File 'sig/anthropic/models/beta/beta_compact_20260112_edit.rbs', line 32

def to_hash: -> {
  type: :compact_20260112,
  instructions: String?,
  pause_after_compaction: bool,
  trigger: Anthropic::Beta::BetaInputTokensTrigger?
}