Class: Anthropic::Models::Beta::BetaCompactionBlock

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

Defined Under Namespace

Modules: ToolChange

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

#initializevoid



26
# File 'sig/anthropic/models/beta/beta_compaction_block.rbs', line 26

def initialize: (

Instance Attribute Details

#contentString?

Summary of compacted content, or null if compaction failed

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


11
# File 'lib/anthropic/models/beta/beta_compaction_block.rb', line 11

required :content, String, nil?: true

#encrypted_contentString?

Opaque metadata from prior compaction, to be round-tripped verbatim

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


17
# File 'lib/anthropic/models/beta/beta_compaction_block.rb', line 17

required :encrypted_content, String, nil?: true

#signatureString?

Signature over the summary, to be sent back with the block verbatim

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :signature, String, nil?: true

#tool_changesArray<Anthropic::Models::Beta::BetaResponseToolAdditionBlock, Anthropic::Models::Beta::BetaResponseToolRemovalBlock>?

The tool changes of the compacted range: the tool_addition and tool_removal blocks that take the request's tools to the tool set in effect at the end of the range, or [] when the range changed no tool. Absent when the server did not compute them. Send the block back unchanged.

Parameters:

  • value (::Array[Anthropic::Models::Beta::BetaCompactionBlock::tool_change], nil)

Returns:



37
38
39
40
41
# File 'lib/anthropic/models/beta/beta_compaction_block.rb', line 37

optional :tool_changes,
-> {
  Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaCompactionBlock::ToolChange]
},
nil?: true

#typeSymbol, :compaction

Parameters:

  • value (:compaction)

Returns:

  • (Symbol, :compaction)


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

required :type, const: :compaction

Instance Method Details

#to_hash{

Returns:

  • ({)


34
# File 'sig/anthropic/models/beta/beta_compaction_block.rbs', line 34

def to_hash: -> {