Package com.axelor.ai.governance
Class AiQuotaServiceImpl
java.lang.Object
com.axelor.ai.governance.AiQuotaServiceImpl
- All Implemented Interfaces:
AiQuotaService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckMonthlyTokenQuota(User user) ThrowsAiExceptionwhen the user's chat-panel turns (CHAT) have consumed at least as many tokens as their role-resolved monthly quota.Per-user rate limit in requests/second.tokenQuotaMonthly(User user) Monthly token budget (inputTokens + outputTokens) for the user.
-
Constructor Details
-
AiQuotaServiceImpl
-
-
Method Details
-
checkMonthlyTokenQuota
Description copied from interface:AiQuotaServiceThrowsAiExceptionwhen the user's chat-panel turns (CHAT) have consumed at least as many tokens as their role-resolved monthly quota. Programmatic and background calls never count. Admins and users with no quota set are always permitted.- Specified by:
checkMonthlyTokenQuotain interfaceAiQuotaService
-
tokenQuotaMonthly
Description copied from interface:AiQuotaServiceMonthly token budget (inputTokens + outputTokens) for the user.nullmeans unlimited — the case for admins and users noAiUsagePolicyapplies to.- Specified by:
tokenQuotaMonthlyin interfaceAiQuotaService
-
rateLimit
Description copied from interface:AiQuotaServicePer-user rate limit in requests/second.nullmeans no limit — admins, and users noAiUsagePolicyapplies to.- Specified by:
rateLimitin interfaceAiQuotaService
-