From 1018908c6d43aa10cfd7198761056808d6b9b310 Mon Sep 17 00:00:00 2001 From: zaidmukaddam Date: Sun, 5 Jan 2025 03:37:29 +0530 Subject: [PATCH] remove rate limit for custom deployments --- app/api/chat/route.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index fd33aee..4327ab4 100644 --- a/app/api/chat/route.ts +++ b/app/api/chat/route.ts @@ -128,12 +128,12 @@ export async function POST(req: Request) { const { messages, model, group } = await req.json(); const { tools: activeTools, systemPrompt } = await getGroupConfig(group); - const identifier = ipAddress(req) || "api"; - const { success } = await ratelimit.limit(identifier); + // const identifier = ipAddress(req) || "api"; + // const { success } = await ratelimit.limit(identifier); - if (!success) { - return new Response("Rate limit exceeded for 100 searches a day.", { status: 429 }); - } + // if (!success) { + // return new Response("Rate limit exceeded for 100 searches a day.", { status: 429 }); + // } const result = streamText({ model: xai(model),