if (req.method !== 'POST') {
res.status(405).json({ error: 'Method not allowed' });
return;
}
if (!question) {
return res.status(400).json({ message: 'No question in the request' });
}
view raw chat.ts hosted with ❤ by GitHub