Package com.axelor.ai.chat.provider
Class AiUserRateLimiter
java.lang.Object
com.axelor.ai.chat.provider.AiUserRateLimiter
Per-user rate limiter, keyed by user code.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AiUserRateLimiter
public AiUserRateLimiter()
-
-
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
-