Like a lot of people, I’ve been going down the rabbit hole of playing with the ChatGPT AI recently.
I realized that it’s pretty good at summarizing news articles, so I decided to build a website that shows 10 NYTimes articles and short summaries of them (so that I can read them with my minuscule attention span).
A day or so later, I finished Brief, a website that does just that!
A few notes:
- It uses the NYTimes Most Popular API, which is surprisingly good and free!
- It scrapes the content from the article via HTML, which is not bad but sometimes doesn’t work very well.
- ChatGPT doesn’t have an API yet, so I’m spinning up a virtual browser using Puppeteer and logging into my OpenAI account pretending to be a user using the demo.
- The Puppeteer runs when the Astro site is building on Vercel, which only happens once an hour, so it’s not that much ChatGPT usage.
- To get Puppeteer working on the Vercel builders, I had to add a few arguments that are apparently 🚨 not safe 🚨 but oh well:
const browser = await puppeteer.launch({
args: ["--no-sandbox", "--disable-setuid-sandbox"],
});
Update: OpenAI quickly got smart and put bot detection in front of ChatGPT, so this stopped working. I had it coming for me. The site is frozen in time to when it stopped working.