Module: Anthropic::Models::Beta::BetaContextManagementConfig::Edit
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/beta_context_management_config.rb,
sig/anthropic/models/beta/beta_context_management_config.rbs
Overview
Automatically compact older context when reaching the configured trigger threshold.
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Beta::BetaClearToolUses20250919Edit, ...
Creates a new instance of the variant class whose
typematches the given value, passing the remaining arguments to its constructor. - .variants ⇒ Array(Anthropic::Models::Beta::BetaClearToolUses20250919Edit, Anthropic::Models::Beta::BetaClearThinking20251015Edit, Anthropic::Models::Beta::BetaCompact20260112Edit)
Instance Method Summary collapse
Methods included from Internal::Type::Union
==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Class Method Details
.new(type:, **args) ⇒ Anthropic::Models::Beta::BetaClearToolUses20250919Edit, ...
Creates a new instance of the variant class whose type matches the given
value, passing the remaining arguments to its constructor.
Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaContextManagementConfig::Edit for more details.
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/anthropic/models/beta/beta_context_management_config.rb', line 60 def self.new(type:, **args) case type.to_sym when :clear_tool_uses_20250919 Anthropic::Beta::BetaClearToolUses20250919Edit.new(**args) when :clear_thinking_20251015 Anthropic::Beta::BetaClearThinking20251015Edit.new(**args) when :compact_20260112 Anthropic::Beta::BetaCompact20260112Edit.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.variants ⇒ Array(Anthropic::Models::Beta::BetaClearToolUses20250919Edit, Anthropic::Models::Beta::BetaClearThinking20251015Edit, Anthropic::Models::Beta::BetaCompact20260112Edit)
|
|
# File 'lib/anthropic/models/beta/beta_context_management_config.rb', line 31
|
Instance Method Details
#self?.variants ⇒ ::Array[Anthropic::Models::Beta::BetaContextManagementConfig::edit]
34 |
# File 'sig/anthropic/models/beta/beta_context_management_config.rbs', line 34
def self?.variants: -> ::Array[Anthropic::Models::Beta::BetaContextManagementConfig::edit]
|