Class: ClaudeAgentSDK::TaskBudget
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::TaskBudget
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
API-side task budget in tokens. When set, the model is made aware of its remaining token budget so it can pace tool use and wrap up before the limit.
Instance Attribute Summary collapse
-
#total ⇒ Object
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(total:) ⇒ TaskBudget
constructor
A new instance of TaskBudget.
- #to_h ⇒ Object
Constructor Details
#initialize(total:) ⇒ TaskBudget
Returns a new instance of TaskBudget.
1719 1720 1721 |
# File 'lib/claude_agent_sdk/types.rb', line 1719 def initialize(total:) @total = total end |
Instance Attribute Details
#total ⇒ Object
Returns the value of attribute total.
1717 1718 1719 |
# File 'lib/claude_agent_sdk/types.rb', line 1717 def total @total end |
Instance Method Details
#to_h ⇒ Object
1723 1724 1725 |
# File 'lib/claude_agent_sdk/types.rb', line 1723 def to_h { total: @total } end |