{"id":25531703,"url":"https://github.com/brenimcode/whatsapp-ai-chatbot","last_synced_at":"2026-01-19T04:30:18.118Z","repository":{"id":277623828,"uuid":"928994479","full_name":"brenimcode/whatsapp-ai-chatbot","owner":"brenimcode","description":"AI-powered conversational agent for barber shops using RAG, Prompt Engineering, and LLMs. Automates WhatsApp support 24/7","archived":false,"fork":false,"pushed_at":"2025-02-15T01:03:49.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T01:27:09.633Z","etag":null,"topics":["ai","docker","langchain","python"],"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/brenimcode.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-07T16:05:47.000Z","updated_at":"2025-02-15T01:03:52.000Z","dependencies_parsed_at":"2025-02-15T01:27:16.432Z","dependency_job_id":"a1cab7b7-8010-47bb-846c-81e4bf83730e","html_url":"https://github.com/brenimcode/whatsapp-ai-chatbot","commit_stats":null,"previous_names":["brenimcode/whatsapp-ai-chatbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenimcode%2Fwhatsapp-ai-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenimcode%2Fwhatsapp-ai-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenimcode%2Fwhatsapp-ai-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenimcode%2Fwhatsapp-ai-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brenimcode","download_url":"https://codeload.github.com/brenimcode/whatsapp-ai-chatbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239758890,"owners_count":19692041,"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":["ai","docker","langchain","python"],"created_at":"2025-02-20T01:19:34.841Z","updated_at":"2026-01-19T04:30:18.067Z","avatar_url":"https://github.com/brenimcode.png","language":"Python","readme":"# Conversational AI Agent for WhatsApp Barber Shops\n\nThis conversational agent leverages **Artificial Intelligence (AI)**, **RAG (Retrieval-Augmented Generation)**, and **Prompt Engineering** to revolutionize customer service for barber shops. It operates **24/7 autonomously**, ensuring **fast, natural, and personalized responses** to WhatsApp users.\n\n## Technologies Used\n\n![Python](https://img.shields.io/badge/Python-3776AB?logo=python\u0026logoColor=white\u0026style=for-the-badge)\n![LangChain](https://img.shields.io/badge/LangChain-%23000000.svg?style=for-the-badge\u0026logo=LangChain\u0026logoColor=white)\n![Docker](https://img.shields.io/badge/Docker-2496ED?logo=docker\u0026logoColor=white\u0026style=for-the-badge)\n![FastAPI](https://img.shields.io/badge/FastAPI-009688?logo=fastapi\u0026logoColor=white\u0026style=for-the-badge)\n![ChromaDB](https://img.shields.io/badge/ChromaDB-FF0000?style=for-the-badge\u0026logo=chroma\u0026logoColor=FFFFFF)\n![Groq](https://img.shields.io/badge/Groq-FF6347?logo=groq\u0026logoColor=white\u0026style=for-the-badge)\n![DeepSeek](https://img.shields.io/badge/DeepSeek-4b6bfc?style=for-the-badge\u0026logoColor=FFFFFF)\n\n## System Overview\n\n![Diagram](https://github.com/user-attachments/assets/010a0461-7b5c-4239-a492-9037ea33e792)\n\nThis system employs **RAG (Retrieval-Augmented Generation)** to generate responses from various document formats (PDF, images, text, etc.), utilizing a **vector database** to fetch relevant information dynamically. This ensures responses that are more **coherent, concise, and less prone to hallucinations**—a common issue in LLMs.\n\nFor efficient data storage, I use **ChromaDB**, a vector database that stores high-dimensional embeddings and efficiently handles retrieval and deletion operations.\n\nEmbeddings are generated using **HuggingFace Embeddings**, an open-source, high-performance solution.\n\nTo maintain conversational context, the agent stores the last five WhatsApp messages, preserving a history that allows for **more accurate and context-aware responses**.\n\nThe LLM receives input structured as follows:\n- **User Message (WhatsApp input)**\n- **Relevant Documents (retrieved from the vector database)**\n- **Optimized Prompt (Few-Shot Prompting with instructions, persona, and context)**\n\nIncoming WhatsApp messages are processed through **WAHA API**, which acts as a middleware between the user and the LLM.\n\nA **FastAPI**-based API exposes a `/webhook` route, which is consumed by the WAHA API. When a message arrives, it is sent to the webhook, processed by the LLM, and a response is generated.\n\n## Requirements\n\nEnsure you have the following installed on your system:\n\n- Python (recommended version: 3.10 or higher)\n- Docker \u0026 Docker Compose\n- Other dependencies listed in `requirements.txt`\n\n## Installing Dependencies\n\nWith the virtual environment activated, install project dependencies using:\n\n```bash\npip install -r requirements.txt\n```\n\n## Running the Project\n\nOnce dependencies are installed, start the services using Docker Compose:\n\n```bash\ndocker-compose up --build\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrenimcode%2Fwhatsapp-ai-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrenimcode%2Fwhatsapp-ai-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrenimcode%2Fwhatsapp-ai-chatbot/lists"}