gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
const fetch = require('node-fetch'); const cheerio = require('cheerio'); const getReddit…
- User
const fetch = require('node-fetch'); const cheerio = require('cheerio');
const getReddit = async () => { const response = await fetch('https://reddit.com'); const body = await response.text();
// parse the html text and extract titles const $ = cheerio.load(body); const titleList = [];
// using CSS selector ('._eYtD2XCVieq6emjKBH3m').each((i, title) => { const titleNode = (title); const titleText = titleNode.text();
titleList.push(titleText);});
console.log(titleList); };
- Assistant
// export the function for external use module.exports = { getReddit };
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.