From 9ab1eb397848914ed707c24c7e441503587fdbc6 Mon Sep 17 00:00:00 2001 From: Ratan Prakash Date: Wed, 31 May 2023 19:18:41 +0530 Subject: [PATCH] Update chat.ts makes it better and doesn't block --- pages/api/chat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/chat.ts b/pages/api/chat.ts index b9f41f54d..20fa9ef8b 100644 --- a/pages/api/chat.ts +++ b/pages/api/chat.ts @@ -9,7 +9,7 @@ export default async function handler( req: NextApiRequest, res: NextApiResponse, ) { - const { question, history } = req.body; + const { question, history } = req?.body; console.log('question', question);