Skip to content

Commit

Permalink
Rate limit per user instead of per chat
Browse files Browse the repository at this point in the history
  • Loading branch information
ronnygunawan committed Feb 4, 2024
1 parent 17b78c9 commit ab28e62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BotNet.CommandHandlers/AI/Gemini/GeminiTextPromptHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public sealed class GeminiTextPromptHandler(
ICommandQueue commandQueue,
ILogger<GeminiTextPromptHandler> logger
) : ICommandHandler<GeminiTextPrompt> {
internal static readonly RateLimiter CHAT_RATE_LIMITER = RateLimiter.PerChat(5, TimeSpan.FromMinutes(5));
internal static readonly RateLimiter VIP_CHAT_RATE_LIMITER = RateLimiter.PerChat(5, TimeSpan.FromMinutes(2));
internal static readonly RateLimiter CHAT_RATE_LIMITER = RateLimiter.PerUserPerChat(5, TimeSpan.FromMinutes(5));
internal static readonly RateLimiter VIP_CHAT_RATE_LIMITER = RateLimiter.PerUserPerChat(5, TimeSpan.FromMinutes(2));

private readonly ITelegramBotClient _telegramBotClient = telegramBotClient;
private readonly GeminiClient _geminiClient = geminiClient;
Expand Down

0 comments on commit ab28e62

Please sign in to comment.