import express from 'express'; import {OpenaiRes} from '../scrapper.js'; const GptRoutes = express.Router(); /** * @swagger * /api/v1/gpt-old: * get: * summary: GPT OLD version turbo * parameters: * - in: query * name: query * required: true * description: The query to be processed by the GPT OLD. * schema: * type: string * 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 }); } }); export { GptRoutes };