Update maxDuration to 60 seconds for chat API and page.tsx

This commit is contained in:
zaidmukaddam 2024-08-13 19:49:00 +05:30
parent 1bdbc1573f
commit 0d49b6b3ce
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import { z } from "zod";
import { geolocation } from '@vercel/functions' import { geolocation } from '@vercel/functions'
// Allow streaming responses up to 30 seconds // Allow streaming responses up to 30 seconds
export const maxDuration = 30; export const maxDuration = 60;
export async function POST(req: Request) { export async function POST(req: Request) {
const { messages, model } = await req.json(); const { messages, model } = await req.json();

View File

@ -89,6 +89,8 @@ import {
ChartTooltipContent, ChartTooltipContent,
} from "@/components/ui/chart"; } from "@/components/ui/chart";
export const maxDuration = 60;
export default function Home() { export default function Home() {
const inputRef = useRef<HTMLInputElement>(null); const inputRef = useRef<HTMLInputElement>(null);
const [lastSubmittedQuery, setLastSubmittedQuery] = useState(""); const [lastSubmittedQuery, setLastSubmittedQuery] = useState("");