{"id":31532505,"url":"https://github.com/karim-elkadhi/ai_chatbot","last_synced_at":"2026-04-30T12:33:48.763Z","repository":{"id":317071045,"uuid":"1000862156","full_name":"Karim-ElKadhi/AI_chatbot","owner":"Karim-ElKadhi","description":"AI chatbot for customer service with real time text and voice interaction","archived":false,"fork":false,"pushed_at":"2025-12-10T15:12:36.000Z","size":2021,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-30T12:33:29.969Z","etag":null,"topics":["chatbot","lang","langfuse","llm","openai","rag","rag-chatbot","sentiment-analysis","speech-recognition","speech-to-text","text-to-speech","tts"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Karim-ElKadhi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-12T12:40:47.000Z","updated_at":"2025-12-10T15:12:40.000Z","dependencies_parsed_at":"2025-10-27T20:09:40.822Z","dependency_job_id":"86c1a9ec-00fb-48e5-8aef-99d87af66624","html_url":"https://github.com/Karim-ElKadhi/AI_chatbot","commit_stats":null,"previous_names":["karim-elkadhi/ai_chatbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Karim-ElKadhi/AI_chatbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karim-ElKadhi%2FAI_chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karim-ElKadhi%2FAI_chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karim-ElKadhi%2FAI_chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karim-ElKadhi%2FAI_chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Karim-ElKadhi","download_url":"https://codeload.github.com/Karim-ElKadhi/AI_chatbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karim-ElKadhi%2FAI_chatbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32465009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chatbot","lang","langfuse","llm","openai","rag","rag-chatbot","sentiment-analysis","speech-recognition","speech-to-text","text-to-speech","tts"],"created_at":"2025-10-04T03:25:55.022Z","updated_at":"2026-04-30T12:33:48.754Z","avatar_url":"https://github.com/Karim-ElKadhi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠AI Chatbot Platform for Insurance Services\n\n\u003e **MediBot** is an intelligent, multimodal chatbot platform built with Python.  \n\u003e It’s designed to enhance **insurance services** through voice and text interactions, emotion analysis, and data-driven dashboards.  \n\n## 🧩 Overview\n\nMediBot offers two main modules:  \n\n- 👥 **User Module** — customers interact with the chatbot using **voice or text**, view their conversation history, and receive emotion-aware responses.  \n- 🧑‍💼 **Admin Module** — decision-makers explore **KPIs, dashboards, and sentiment analytics**, manage users, and monitor global activity.\n\n---\n## 🚀 Key Features\n### 🗣️ Multimodal Interaction\n\n- Supports **Text** 💬 and  **Voice** 🎙️ input using Speech-to-Text (STT) and Text-to-Speech (TTS) technologies.\n\n- Provides natural, human-like responses with audio output.\n\n### 💬 Conversational Intelligence\n\n- Real-time **emotion \u0026 intent detection** (e.g., *happy, sad, angry, neutral*).\n- Generates automatic satisfaction scores based on emotion trends.\n\n### 🧠 Sentiment \u0026 Emotion Monitoring\n\n- Tracks sentiment evolution across each conversation.\n\n- Displays **interactive graphs** showing emotional evolution.\n\n### 🔐 Secure Authentication\n- **JWT-based authentication** with role-based access control:\n\n  - 🧍 **Users** — interact with the bot and review their conversation history.\n\n  - 🧑‍💼 **Admins** — access advanced dashboards and user management tools.\n\n### 💾 Persistent Data Storage\n\n- Stores conversations, users, and sentiment scores in a SQLite database.\n\n- Enables filtered queries and historical analysis.\n\n\n---\n\n\n## 🧍‍♂️ User Module\n\n\u003cdetails\u003e\n\u003csummary\u003e🧭 Click to expand\u003c/summary\u003e\n\n### Features\n- Interact with MediBot via **text** or **voice commands**.  \n- Enjoy **real-time voice replies** through Text-to-Speech (TTS).  \n- Access **chat history** and review previous interactions.  \n- Experience adaptive responses based on emotional tone.  \n\n### Example User Flow\n1. Log in with credentials.  \n2. Start a conversation (voice or text).  \n3. MediBot detects emotions, intent, and provides contextual responses.  \n4. View conversation history revisit previous conversations.\n\n![User Chat Interface](./utils/int_user.png) \n\n------------------------------------------------------------------------------------------------------\n\n\n![User History](./utils/historique.png) \n\n\n\u003c/details\u003e\n\n---\n\n## 🧑‍💼 Admin Module (Decision-Makers Dashboard)\nThe admin area empowers decision-makers with data-driven insights:\n\u003cdetails\u003e\n\u003csummary\u003e📊 Click to expand\u003c/summary\u003e\n\n### 📊 KPI \u0026 Analytics\n\n- View real-time **metrics and visual dashboards** (user activity, sentiment trends, satisfaction scores).  \n- Access aggregated analytics across all users and sessions.\n\n### 🧾 Conversations Management\n\n- Access a complete list of all users’ conversations.\n\n- Filter, search, and export conversation histories.\n\n### 👥 User Management\n\n- Add 🟢, modify 🟡, or delete 🔴 users.  \n- Manage **roles and permissions** dynamically.\n\n### 😊 Sentiment Monitoring\n\n- Visual dashboards for sentiment analysis across users and time periods.\n\n- Identify negative trends or dissatisfaction in customer interactions.\n\n ![Admin Dashboard](./utils/int_admin.png) \n\n------------------------------------------------------------------------------------------------------\n\n ![Admin Sentiment](./utils/admin.png) \n\n\u003c/details\u003e\n\n---\n\n### ⚙️ Technical Details\n\nMediBot is built using a modular, scalable, and RAG-enabled AI architecture to provide context-aware and accurate responses.\n\n### 🔹 Core AI Components\n\n- Retrieval-Augmented Generation (RAG)\n\nUses LangChain to orchestrate retrieval of relevant information and generate responses.\n\nEnhances factual accuracy by combining dataset knowledge with LLM generation.\n\n- Vector Store \u0026 Semantic Search\n\nEmbeddings generated via SentenceTransformers (all-MiniLM-L6-v2 or multilingual variants).\n\nFAISS vector store enables fast semantic search on the dataset (question, intent, category, response).\n\n- Large Language Model Integration\n\nGroq LLM generates natural, context-aware responses based on retrieved passages.\n\nPrompt templates adapt dynamically to the user’s language using get_system_prompt(language).\n\n- Multilingual Support\n\nDetects input language automatically.\n\nRetrieval and generation respect the detected language, ensuring consistent responses in French, English, or other languages.\n\n- Observability \u0026 Monitoring\n\nLangfuse tracks every RAG interaction: user query, retrieved context, LLM output, and metrics.\n\nEnables debugging, analytics, and continuous improvement of the chatbot’s accuracy.\n\n\n---\n## 🧱 Project Structure\n\nAI-chatbot/\n├── main.py\n\n├── utils\n\n│ └── lang.py\n\n├── dataset\n\n│ ├── dataset.csv\n\n├── database/\n\n│ └── databaset.db\n\n│ └── conversations.db\n\n├── requirements.txt\n\n├── README.md\n\n## 📦 Installation\n\n1. **Clone the repository**:\n\n```bash\ngit clone https://github.com/Karim-ElKadhi/AI-chatbot.git\ncd AI-chatbot\npip install -r requirements.txt\npython app/main.py\n\n## Access the interface\n\n🧍 User Dashboard → http://localhost:5000/user\n\n🧑‍💼 Admin Dashboard → http://localhost:5000/admin\n```\n📄 License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarim-elkadhi%2Fai_chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarim-elkadhi%2Fai_chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarim-elkadhi%2Fai_chatbot/lists"}