{"id":22352224,"url":"https://github.com/shamspias/deadlyaichatbot","last_synced_at":"2026-04-03T03:35:00.399Z","repository":{"id":65219321,"uuid":"588096483","full_name":"shamspias/deadlyAIchatbot","owner":"shamspias","description":"This repository contains a WhatsApp chatbot built with Flask and powered by OpenAI's GPT-3 and DALL-E-2 language models. The chatbot is able to understand and respond to natural language queries and provide helpful information. The chatbot can help in many area like customer service, providing news and answering frequently asked questions.","archived":false,"fork":false,"pushed_at":"2023-01-17T07:48:14.000Z","size":63,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-04T12:17:45.406Z","etag":null,"topics":["artificial-intelligence","dalle2","flask","gpt-3","gptchat","nlp","python","whatsapp-bot","whatsapp-business-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shamspias.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-12T10:12:27.000Z","updated_at":"2024-09-11T19:18:21.000Z","dependencies_parsed_at":"2023-02-10T08:31:19.699Z","dependency_job_id":null,"html_url":"https://github.com/shamspias/deadlyAIchatbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2FdeadlyAIchatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2FdeadlyAIchatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2FdeadlyAIchatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shamspias%2FdeadlyAIchatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shamspias","download_url":"https://codeload.github.com/shamspias/deadlyAIchatbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236518723,"owners_count":19162119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","dalle2","flask","gpt-3","gptchat","nlp","python","whatsapp-bot","whatsapp-business-api"],"created_at":"2024-12-04T12:17:50.622Z","updated_at":"2025-10-14T21:31:00.340Z","avatar_url":"https://github.com/shamspias.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## WhatsAPP AI Chatbot for DeadlyAI\nRename example-docker-compose.yml to docker-compose.yml\n\n\nFlask, Celery, Flower and Redis services with Docker\ndocker-compose.yml file split into the following services\n- redis\n- website\n- celery\n- flower\n\n### Build With\n- Whatsapp Business API\n- OpenAI GPT-3\n- OpenAI DAL-E-2\n\n### Technology \n\n* Python\n* Flask\n* PostgresSQL\n\n\n### Install \u0026 deploy\n\n- Rename example.env to .env and set the API key for OpenAI\n- Create a virtual environment and active it\n  - Windows\n  - ```python -m venv venv```\n  - ```venv/Scripts/activate```\n  - Linux/Mac \n  - ```python3 -m venv venv```\n  - ```venv/bin/activate```\n- Install the requirements ```pip install -r requirements.txt```\n- Run it ```python app.py```\n- If everything is ok then host it with Nginx and Guniron.\n\n### Host Flask Application\n- Host to Ubuntu VPS [Tutorial](https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-20-04)\n- Host to Heroku [Tutorial](https://www.geeksforgeeks.org/deploy-python-flask-app-on-heroku/)\n\n\n\n## Setup gunicorn\n\n- Make gunicorn service file```sudo nano /etc/systemd/system/deadlyai.service```\n- Write service into gunicorn service file\n  ```\n  [Unit]\n  Description=Gunicorn instance to serve whatsapp chatbot script\n  After=network.target\n  \n  [Service]\n  User=ubuntu\n  Group=www-data\n  WorkingDirectory=/home/ubuntu/deadlyAIchatbot\n  Environment=\"PATH=/home/ubuntu/deadlyAIchatbot/venv/bin\"\n  ExecStart=/home/ubuntu/deadlyAIchatbot/venv/bin/gunicorn --workers 3 --bind unix:deadlyai.sock -m 007 wsgi:app\n  \n  [Install]\n  WantedBy=multi-user.target\n  ```\n- Start and enable the service \n  ``` sudo systemctl start deadlyai \u0026\u0026 sudo systemctl enable deadlyai ```\n\n## Setup Nginx\n\n- Create nginx config `sudo nano /etc/nginx/sites-available/deadlyai` and add the code\n  ``` \n  server {\n      listen 80;\n      server_name chatbot.deadlyai.com www.chatbot.deadlyai.com;\n  \n      location / {\n          include proxy_params;\n          proxy_pass http://unix:/home/ubuntu/deadlyAIchatbot/deadlyai.sock;\n      }\n  }\n  ```\n- Symlink the nginx config `sudo ln -s /etc/nginx/sites-available/deadlyai /etc/nginx/sites-enabled`\n- Restart the nginx\n\n\nWith Docker\n```\nversion: '3.8'\n\nservices:\n\n  redis:\n    image: 'redis:5.0.5'\n    command: redis-server --requirepass devpassword\n    volumes:\n      - 'redis:/var/lib/redis/data'\n    ports:\n      - '6379:6379'\n\n  website:\n    build: .\n    command: \u003e\n      gunicorn -b 0.0.0.0:8000\n        --access-logfile -\n        --reload\n        \"src.app:flask_app\"\n    env_file:\n      - '.env'\n    volumes:\n      - '.:/deadlyai'\n    ports:\n      - '8000:8000'\n\n  celery:\n    build: .\n    command: celery -A wsgi_app.celery worker --loglevel=info --pool=solo\n    env_file:\n      - '.env'\n    volumes:\n      - '.:/deadlyai'\n\n  flower:\n    image: mher/flower\n    environment:\n      - CELERY_BROKER_URL=redis://:devpassword@redis:6379/0\n      - FLOWER_PORT=5555\n    ports:\n      - 5555:5555\n\nvolumes:\n  redis:\n\n```\n\n## Instructions\n1. Must have docker installed.\n2. CD into the root of the project\n3. Create a .env file with the following env variables. Place it in the root directory (same level as docker-compose.yaml).\n   ```\n   COMPOSE_PROJECT_NAME=deadlyai\n   PYTHONUNBUFFERED=true\n   ```\n4. Build the containers\n   ```\n   docker-compose up --build\n   ```\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshamspias%2Fdeadlyaichatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshamspias%2Fdeadlyaichatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshamspias%2Fdeadlyaichatbot/lists"}