This project is a Node.js application that summarizes website content using OpenAI's GPT-3 engine.
- Fetch website content using
axios
andcheerio
- Remove unnecessary elements from the HTML
- Extract meta description and text from the HTML
- Preprocess text using the
natural
package - Generate summaries using OpenAI's GPT-3 engine
- Print the summarized content and token usage
You'll need the following installed on your system:
- Node.js (v12 or later)
- NPM (v6 or later)
-
Clone this repository: git clone https://github.com/ComBba/HtmlToJsonUsingNode.js.git
-
Navigate to the project directory: cd HtmlToJsonUsingNode.js
-
Install the required dependencies: npm install
-
Create an
.env.local
file in the project root with the following content: OPENAI_API_KEY=your_openai_api_key
Replace your_openai_api_key
with your actual OpenAI API key.
-
Run the application: node webToJson.js
-
The application will fetch the website content, generate a summary using OpenAI's GPT-3 engine, and print the summarized content and token usage.
This project is licensed under the MIT License.