forked from Nutlope/roomGPT
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
increased generations to 3 per day and replaced screenshot in README
- Loading branch information
Showing
3 changed files
with
4 additions
and
4 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 1 request per 24 hours | ||
// Create a new ratelimiter, that allows 3 requests per 24 hours | ||
const ratelimit = redis | ||
? new Ratelimit({ | ||
redis: redis, | ||
limiter: Ratelimit.fixedWindow(1, "1440 m"), | ||
limiter: Ratelimit.fixedWindow(3, "1440 m"), | ||
analytics: true, | ||
}) | ||
: undefined; | ||
|
@@ -41,7 +41,7 @@ export default async function handler( | |
res | ||
.status(429) | ||
.json( | ||
"We're temporarily limiting generations to 1 per day because of high traffic. For any questions, email [email protected]" | ||
"We're temporarily limiting generations to 3 per day because of high traffic. 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.