import express from 'express'; import {OpenaiRes} from '../scrapper.js'; const GptRoutes = express.Router(); /** * @swagger * /api/v1/gpt-old: * get: * summary: GPT OLD version turbo * responses: * 200: * description: Success */ GptRoutes.get('/api/v1/gpt-old', async (req, res) => { try { const query = req.query.query; const results = await OpenaiRes(query); res.json({ results }); } catch (error) { res.status(401).json({ error: error.message }); } });