Package com.axelor.ai.chat.provider
Class AiRateLimiter
java.lang.Object
com.axelor.ai.chat.provider.AiRateLimiter
Per-model rate limiter, keyed by model code with the model's configured rateLimit.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AiRateLimiter
public AiRateLimiter()
-
-
Method Details
-
acquire
Acquires a permit for the given key, blocking while the rate limit is reached. No-op when the key is null or the rate limit is null / non-positive.- Parameters:
key- unique identifier of what is limitedmaxRps- max requests per second
-