From 0d49b6b3ce26fdce646fd4e021b8752f9767b7c1 Mon Sep 17 00:00:00 2001 From: zaidmukaddam Date: Tue, 13 Aug 2024 19:49:00 +0530 Subject: [PATCH] Update maxDuration to 60 seconds for chat API and page.tsx --- app/api/chat/route.ts | 2 +- app/page.tsx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts index c43a8f0..d145621 100644 --- a/app/api/chat/route.ts +++ b/app/api/chat/route.ts @@ -6,7 +6,7 @@ import { z } from "zod"; import { geolocation } from '@vercel/functions' // Allow streaming responses up to 30 seconds -export const maxDuration = 30; +export const maxDuration = 60; export async function POST(req: Request) { const { messages, model } = await req.json(); diff --git a/app/page.tsx b/app/page.tsx index 03598b2..428ae90 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -89,6 +89,8 @@ import { ChartTooltipContent, } from "@/components/ui/chart"; +export const maxDuration = 60; + export default function Home() { const inputRef = useRef(null); const [lastSubmittedQuery, setLastSubmittedQuery] = useState("");