-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,11 +17,11 @@ interface ExtendedNextApiRequest extends NextApiRequest { | |
}; | ||
} | ||
|
||
// Create a new ratelimiter, that allows 3 requests per 24 hours | ||
// Create a new ratelimiter, that allows 1 request per 24 hours | ||
const ratelimit = redis | ||
? new Ratelimit({ | ||
redis: redis, | ||
limiter: Ratelimit.fixedWindow(3, "1440 m"), | ||
limiter: Ratelimit.fixedWindow(1, "1440 m"), | ||
analytics: true, | ||
}) | ||
: undefined; | ||
|
@@ -40,7 +40,9 @@ export default async function handler( | |
if (!result.success) { | ||
res | ||
.status(429) | ||
.json("Too many uploads in 1 day. Please try again in 24 hours."); | ||
.json( | ||
"We're temporarily limiting generations to 1 per day because of high traffic. Please try again in 24 hours. For any questions, email [email protected]" | ||
); | ||
return; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6e45975
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
room-gpt – ./
room-gpt-git-main-vercel-labs.vercel.app
room-gpt.vercel.app
room-gpt-vercel-labs.vercel.app
roomgpt.io
www.roomgpt.io