Skip to content
/ articlesumz Public template

Summarize any article with Sumz, an open-source article summarizer that transforms lengthy articles into clear and concise summaries.

License

Notifications You must be signed in to change notification settings

jbxamora/articlesumz

Repository files navigation

Open Source Article Summarizer with OpenAI GPT-4

Sumz is an open-source article summarization tool powered by the advanced capabilities of OpenAI GPT-4. Designed to help users quickly grasp the essence of lengthy articles, Sumz transforms verbose content into clear, concise, and informative summaries. By leveraging the cutting-edge natural language processing techniques of GPT-4, Sumz ensures that generated summaries maintain context, coherence, and accuracy.

Key Features

  • Open-source
  • Powered by GPT-4
  • Flexible input formats
  • Customizable summary length
  • Easy integration
  • Multi-platform compatibility

Current Deployment

Sumz Deployment

Deployed Site

Installation

Follow these steps to install and set up Sumz on your local machine:

Clone the repository:

git clone https://github.com/jbxamora/articlesumz.git .

Install Dependencies:

npm i or npm install

Create dotenv file:

VITE_RAPID_API_KEY=yourapikey

Run on your local machine:

npm run dev

Enjoy Summarizing!

API

View The Endpoints Here:

This is an API which extracts news/article body from a URL and uses GPT to summarize the article content.

RapidAPI

Example Config

const axios = require("axios");

const options = {
  method: 'POST',
  url: 'https://article-extractor-and-summarizer.p.rapidapi.com/summarize-text',
  headers: {
    'content-type': 'application/json',
    'X-RapidAPI-Key': 'yourapikey',
    'X-RapidAPI-Host': 'article-extractor-and-summarizer.p.rapidapi.com'
  },
  data: '{"text":"article of markdown text"}'
};

axios.request(options).then(function (response) {
	console.log(response.data);
}).catch(function (error) {
	console.error(error);
});

RDTK Config

Here's I configured the request using RDTK

export const articleApi = createApi({
    reducerPath: "articleApi",
    baseQuery: fetchBaseQuery({ 
        baseUrl: "https://article-extractor-and-summarizer.p.rapidapi.com/" ,
        prepareHeaders: (headers) => {
            headers.set("X-RapidAPI-Key", rapidApiKey);
            headers.set("X-RapidAPI-Host", 'article-extractor-and-summarizer.p.rapidapi.com');
            return headers;
        }
    }),
    endpoints: (builder) =>  ({
        getSummary: builder.query({
            query: (params) => `/summarize?url=${encodeURIComponent(params.articleUrl)}&length=3`
        })
    })
});

In order to increase the length of the summary

//Adjust the length parameter:
 endpoints: (builder) =>  ({
        getSummary: builder.query({
            query: (params) => `/summarize?url=${encodeURIComponent(params.articleUrl)}&length=3` // Here
        })
    })
});

About

Summarize any article with Sumz, an open-source article summarizer that transforms lengthy articles into clear and concise summaries.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project