Nutlope / news-summarizer

News summarizer with AI
https://news-summarizer.vercel.app
350 stars 73 forks source link

Convert `/api/summarize` to GET endpoint so that it can use cache to reduce unnecessary OpenAI endpoint call #3

Open xcv58 opened 1 year ago

xcv58 commented 1 year ago

I tested locally by converting it to a GET endpoint and use query params to set URL.

https://github.com/Nutlope/news-summarizer/blob/6d4814855fe9f181462777f09ec9f26a36debfbb/pages/%5B...slug%5D.tsx#L50

xcv58 commented 1 year ago

You can try it here: https://news-summarizer-git-get-cache-xcv58.vercel.app/2023/02/11/cities-cycles-and-san-franciscos-return

And here is the change: https://github.com/Nutlope/news-summarizer/compare/main...xcv58:news-summarizer:GET-cache?expand=1