Closed RostyslavManko closed 8 months ago
@thehackergpt Can we "Monthly Usage Tracking" to new separated issues? those issues are not related rate limits.
Monthly usage tracking can be achieved chats table without do anything. We will need to consider an UI design and navigation.
Optionally, include a feature to track the number of tokens used per model each month.
This issue requires a slightly more complex implementation. A bit large to include in this Issue.
@momonja3, sure, no problem. This was optional at the beginning, and we can work on it later if necessary. Let's focus on completing the essential tasks first.
Background
To manage our system resources efficiently and maintain a quality service, we are introducing rate limits on the number of messages users can send within a 3-hour period. This will be implemented using Supabase to store each user's message count for both HackerGPT and GPT-4 Turbo models. The rate limits will differ for Free and Plus users. Additionally, we aim to track the total number of messages sent each month for each model, and if feasible, the token usage as well. This implementation can take cues from our existing rate limit logic in this repository.
Objective
To establish a rate-limiting system that tracks and controls the number of messages sent by each user over a 3-hour period for both HackerGPT and GPT-4 Turbo models. This system should be adjustable and provide clear feedback to users when they reach their limit. Plus, it should maintain a monthly log of total messages and, optionally, token usage for each model.
Actions and Considerations (ACC)
Rate Limit Logic Implementation:
User Feedback and Notification:
Testing and Quality Assurance:
Expected Outcomes