news-summarizer icon indicating copy to clipboard operation
news-summarizer copied to clipboard

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

Open xcv58 opened this issue 2 years ago • 1 comments
trafficstars

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 avatar Feb 12 '23 01:02 xcv58

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

xcv58 avatar Feb 12 '23 02:02 xcv58