Package com.tnsai.llm.cost
package com.tnsai.llm.cost
Token usage tracking and budget management for LLM API calls.
Provides CostTracker for recording per-call token usage
and BudgetManager for enforcing configurable spending limits
with automatic cutoff.
- See Also:
-
ClassDescriptionException thrown when a budget limit is exceeded.Manages budget limits and alerts for LLM usage.LLMClient wrapper that tracks usage costs and enforces budgets.Interface for tracking LLM API usage costs.Aggregated cost statistics.In-memory implementation of CostTracker.Model pricing information for cost calculation.Record of a single LLM API call usage.