sync
This commit is contained in:
@@ -10,9 +10,12 @@ export function createRateLimiter(modelId: string, rateLimit: number | undefined
|
|||||||
const dict = i18n(localeFromRequest(request))
|
const dict = i18n(localeFromRequest(request))
|
||||||
|
|
||||||
const limits = Subscription.getFreeLimits()
|
const limits = Subscription.getFreeLimits()
|
||||||
const headersExist = Object.entries(limits.checkHeaders).every(
|
// temporarily disable check headers
|
||||||
([name, value]) => request.headers.get(name)?.toLowerCase().includes(value) ?? false,
|
//const headersExist = Object.entries(limits.checkHeaders).every(
|
||||||
)
|
// ([name, value]) => request.headers.get(name)?.toLowerCase().includes(value) ?? false,
|
||||||
|
//)
|
||||||
|
//const dailyLimit = !headersExist ? limits.dailyRequestsFallback : (rateLimit ?? limits.dailyRequests)
|
||||||
|
const headersExist = true
|
||||||
const dailyLimit = !headersExist ? limits.dailyRequestsFallback : (rateLimit ?? limits.dailyRequests)
|
const dailyLimit = !headersExist ? limits.dailyRequestsFallback : (rateLimit ?? limits.dailyRequests)
|
||||||
const isDefaultModel = headersExist && !rateLimit
|
const isDefaultModel = headersExist && !rateLimit
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user