Package com.embabel.agent.core
Class Budget.Builder
-
- All Implemented Interfaces:
public final class Budget.BuilderNested builder for Budget objects.
-
-
Method Summary
Modifier and Type Method Description final Budget.Buildercost(Double cost)Sets the cost of running the process, in USD. final Budget.Builderactions(Integer actions)Set the maximum number of actions the agent can perform before termination. final Budget.Buildertokens(Integer tokens)Set a maximum the maximum number of tokens the agent can use before termination. final Budgetbuild()Build the Budget. -
-
Method Detail
-
cost
final Budget.Builder cost(Double cost)
Sets the cost of running the process, in USD.
- Parameters:
cost- the cost limit- Returns:
this Builder
-
actions
final Budget.Builder actions(Integer actions)
Set the maximum number of actions the agent can perform before termination.
- Parameters:
actions- the action count limit- Returns:
this Builder
-
tokens
final Budget.Builder tokens(Integer tokens)
Set a maximum the maximum number of tokens the agent can use before termination. This can be useful in the case of local models where the cost is not directly measurable, but we don't want excessive work.
- Parameters:
tokens- the token count limit- Returns:
this Builder
-
-
-
-