Class: ClaudeAgentSDK::TaskBudget

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(total:) ⇒ TaskBudget

Returns a new instance of TaskBudget.



1740
1741
1742
# File 'lib/claude_agent_sdk/types.rb', line 1740

def initialize(total:)
  @total = total
end

Instance Attribute Details

#totalObject

Returns the value of attribute total.



1738
1739
1740
# File 'lib/claude_agent_sdk/types.rb', line 1738

def total
  @total
end

Instance Method Details

#to_hObject



1744
1745
1746
# File 'lib/claude_agent_sdk/types.rb', line 1744

def to_h
  { total: @total }
end