Module: Anthropic::Models::ThinkingConfigParam
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/thinking_config_param.rb,
sig/anthropic/models/thinking_config_param.rbs
Overview
Configuration for Claude's thinking.
With {"type": "adaptive"}, Claude decides when and how much to think. With
{"type": "enabled"} (manual extended thinking), you set a budget_tokens of
at least 1,024. Thinking tokens count toward your max_tokens limit.
Which type values are accepted, and what happens when you omit thinking,
depend on the model. See
thinking
for each model's behavior.
Defined Under Namespace
Modules: Type
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::ThinkingConfigEnabled, ...
Creates a new instance of the variant class whose
typematches the given value, passing the remaining arguments to its constructor. - .values ⇒ Array<Symbol>
- .variants ⇒ Array(Anthropic::Models::ThinkingConfigEnabled, Anthropic::Models::ThinkingConfigDisabled, Anthropic::Models::ThinkingConfigBetweenTools, Anthropic::Models::ThinkingConfigAdaptive)
Methods included from Internal::Type::Union
==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type
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:, budget_tokens:, display_:) ⇒ Anthropic::ThinkingConfigEnabled .new(type:) ⇒ Anthropic::ThinkingConfigDisabled .new(type:) ⇒ Anthropic::ThinkingConfigBetweenTools .new(type:, display_:) ⇒ Anthropic::ThinkingConfigAdaptive .new(type:, budget_tokens:, display_:) ⇒ Anthropic::Models::thinking_config_param
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::ThinkingConfigParam for more details.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/anthropic/models/thinking_config_param.rb', line 59 def self.new(type:, **args) case type.to_sym when :enabled Anthropic::ThinkingConfigEnabled.new(**args) when :disabled Anthropic::ThinkingConfigDisabled.new(**args) when :between_tools Anthropic::ThinkingConfigBetweenTools.new(**args) when :adaptive Anthropic::ThinkingConfigAdaptive.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/thinking_config_param.rb', line 36
|
.variants ⇒ Array(Anthropic::Models::ThinkingConfigEnabled, Anthropic::Models::ThinkingConfigDisabled, Anthropic::Models::ThinkingConfigBetweenTools, Anthropic::Models::ThinkingConfigAdaptive)
|
|
# File 'lib/anthropic/models/thinking_config_param.rb', line 40
|