Anthropic::ThinkingConfig
Configuration for extended thinking.
Extended thinking allows Claude to show its reasoning process. Set a budget_tokens value to control how many tokens can be used for thinking.
Example:
config = Anthropic::ThinkingConfig.new(budget_tokens: 10000)
request = Anthropic::Messages::Request.new(
model: Anthropic::Model.sonnet,
messages: [Anthropic::Message.user("Solve this problem...")],
max_tokens: 4096,
thinking: config
)
Constructors
Instance methods
budget_tokens
Sourcetype
Source