This is a Node.js application built with TypeScript that allows you to create an automated WhatsApp response system using the Venom Bot library and integrate it with the OpenAI API for artificial intelligence capabilities.
Before getting started, make sure you have the following installed on your machine:
- Node.js (v14 or higher)
- NPM (Node Package Manager)
- Clone this repository to your local machine:
git clone https://github.com/diogozdev/AI-whatsapp.git
- Navigate to the project directory:
cd AI-whatsapp
- Install the dependencies:
npm install
- Create a new OpenAI API key by signing up on the OpenAI website.
- Open the
.env
file in the project root directory and add your OpenAI API key:
OPENAI_API_KEY=your-api-key
- Customize the Venom Bot configuration in the
src/index.ts
file to suit your needs. You can set up different responses based on the received messages or implement your own logic.
To start the application, run the following command:
npm start
The application will now listen for incoming WhatsApp messages and respond accordingly using the configured responses and the OpenAI API for artificial intelligence capabilities.
This project is licensed under the MIT License. See the LICENSE file for details.
- Venom Bot - A library for creating WhatsApp bots in Node.js.
- OpenAI API - An artificial intelligence platform that provides various models and capabilities.