This is a chatbot application that uses the GPT model to answer user's questions through Facebook Messenger.
The application uses the facebook-chat-api library to log in to Facebook and listen for messages and chatgpt-api library to use ChatGPT api.
- Docker
- Node.js
- Clone the repository:
git clone https://github.com/hiepnguyen223/facebook-chat-bot-gpt.git
cd facebook-chat-bot-apt - Create .env file"
cp .env.example .env //Set your environment variables in the .env file:
FACEBOOK_ID='...'
FACEBOOK_NAME='...'
OPENAI_API_KEY='...'- Create cookies.json (Facebook Cookies) file:
cp cookies.example.json cookies.json- Build the docker image:
docker build -t chat-bot-gpt .- Run docker image as a container:
docker run chat-bot-gpt