Package com.tnsai.llm.cost
Class BudgetExceededException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tnsai.exceptions.TnsAIException
com.tnsai.llm.cost.BudgetExceededException
- All Implemented Interfaces:
Serializable
public class BudgetExceededException
extends com.tnsai.exceptions.TnsAIException
Exception thrown when a budget limit is exceeded.
This exception is thrown by CostAwareLLMClient when hard budget limits are enforced and a request would exceed them.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBudgetExceededException(String message) BudgetExceededException(BigDecimal currentSpend, BigDecimal limit, BigDecimal estimatedCost) -
Method Summary
Methods inherited from class com.tnsai.exceptions.TnsAIException
getContext, getErrorCode, getMaxRetryAttempts, getMessage, getSuggestedRetryDelayMs, getThrownAt, isRetryable, wrapMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BudgetExceededException
-
BudgetExceededException
-
-
Method Details
-
getCurrentSpend
-
getLimit
-
getEstimatedCost
-
getRemaining
-