Class: Smith::Tool::ExecutionBatchAdmission
- Inherits:
-
Object
- Object
- Smith::Tool::ExecutionBatchAdmission
- Extended by:
- Dry::Initializer
- Defined in:
- lib/smith/tool/execution_batch_admission.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/smith/tool/execution_batch_admission.rb', line 13 def call return if calls.empty? || bounded_completion_admits_calls? reservation = reserve return reservation if reservation return unless call_budget || workflow_budgeted? raise BudgetExceeded, "agent tool_calls budget exceeded" end |