Record Class AiBudget
java.lang.Object
java.lang.Record
com.shaft.pilot.ai.AiBudget
- Record Components:
maxInputTokens- maximum estimated input tokensmaxOutputTokens- maximum requested output tokensmaxCostUsd- maximum accepted provider-reported cost in USD
public record AiBudget(long maxInputTokens, long maxOutputTokens, BigDecimal maxCostUsd)
extends Record
Per-request limits for model usage.
-
Constructor Summary
ConstructorsConstructorDescriptionAiBudget(long maxInputTokens, long maxOutputTokens, BigDecimal maxCostUsd) Creates and validates a request budget. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaxCostUsdrecord component.longReturns the value of themaxInputTokensrecord component.longReturns the value of themaxOutputTokensrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AiBudget
Creates and validates a request budget.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
maxInputTokens
public long maxInputTokens()Returns the value of themaxInputTokensrecord component.- Returns:
- the value of the
maxInputTokensrecord component
-
maxOutputTokens
public long maxOutputTokens()Returns the value of themaxOutputTokensrecord component.- Returns:
- the value of the
maxOutputTokensrecord component
-
maxCostUsd
Returns the value of themaxCostUsdrecord component.- Returns:
- the value of the
maxCostUsdrecord component
-