Class: Anthropic::Models::Beta::BetaClearToolUses20250919Edit

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit.rb

Defined Under Namespace

Modules: ClearToolInputs, Trigger

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(clear_at_least: nil, clear_tool_inputs: nil, exclude_tools: nil, keep: nil, trigger: nil, type: :clear_tool_uses_20250919) ⇒ void

Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaClearToolUses20250919Edit for more details.

Parameters:



# File 'lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit.rb', line 45


Instance Attribute Details

#clear_at_leastAnthropic::Models::Beta::BetaInputTokensClearAtLeast?

Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed.



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

optional :clear_at_least, -> { Anthropic::Beta::BetaInputTokensClearAtLeast }, nil?: true

#clear_tool_inputsBoolean, ...

Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)

Returns:



23
24
25
# File 'lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit.rb', line 23

optional :clear_tool_inputs,
union: -> { Anthropic::Beta::BetaClearToolUses20250919Edit::ClearToolInputs },
nil?: true

#exclude_toolsArray<String>?

Tool names whose uses are preserved from clearing

Returns:

  • (Array<String>, nil)


31
# File 'lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit.rb', line 31

optional :exclude_tools, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#keepAnthropic::Models::Beta::BetaToolUsesKeep?

Number of tool uses to retain in the conversation



37
# File 'lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit.rb', line 37

optional :keep, -> { Anthropic::Beta::BetaToolUsesKeep }

#triggerAnthropic::Models::Beta::BetaInputTokensTrigger, ...

Condition that triggers the context management strategy



43
# File 'lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit.rb', line 43

optional :trigger, union: -> { Anthropic::Beta::BetaClearToolUses20250919Edit::Trigger }

#typeSymbol, :clear_tool_uses_20250919

Returns:

  • (Symbol, :clear_tool_uses_20250919)


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

required :type, const: :clear_tool_uses_20250919