{"id":21022667,"url":"https://github.com/ubos-tech/ai-chatbot-starter-kit","last_synced_at":"2025-05-15T08:32:37.676Z","repository":{"id":213356708,"uuid":"733970873","full_name":"UBOS-tech/AI-Chatbot-Starter-Kit","owner":"UBOS-tech","description":"AI Chatbot Starter Kit: An open-source, extensible framework for rapidly developing custom AI chatbots with integrations for popular data sources, messaging platforms, LLM models, and CRM systems. Ideal for developers looking for a minimal boilerplate solution.","archived":false,"fork":false,"pushed_at":"2024-08-07T16:56:41.000Z","size":274,"stargazers_count":16,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-03T06:41:49.734Z","etag":null,"topics":["chatgpt","chatgpt-api","chatgpt-bot","facebook-bot","instagram-chatbot","llm","llm-agent","llm-training","low-code","lowcode-editor","node-red","openai","openai-api","pinecone","support-bot","telegram-chat-bot","ubos-tech","whatsapp-bot"],"latest_commit_sha":null,"homepage":"https://ubos.tech/listing/ai-chatbot/","language":null,"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/UBOS-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2023-12-20T14:55:25.000Z","updated_at":"2025-03-25T04:11:04.000Z","dependencies_parsed_at":"2024-07-27T12:22:52.270Z","dependency_job_id":"9cc66efd-ca08-4ebb-91bc-b7d5c755f7ea","html_url":"https://github.com/UBOS-tech/AI-Chatbot-Starter-Kit","commit_stats":null,"previous_names":["ubos-tech/ai-bot-custom-gpt","ubos-tech/ai-chatbot-starter-kit"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UBOS-tech%2FAI-Chatbot-Starter-Kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UBOS-tech%2FAI-Chatbot-Starter-Kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UBOS-tech%2FAI-Chatbot-Starter-Kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UBOS-tech%2FAI-Chatbot-Starter-Kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UBOS-tech","download_url":"https://codeload.github.com/UBOS-tech/AI-Chatbot-Starter-Kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254304645,"owners_count":22048446,"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":["chatgpt","chatgpt-api","chatgpt-bot","facebook-bot","instagram-chatbot","llm","llm-agent","llm-training","low-code","lowcode-editor","node-red","openai","openai-api","pinecone","support-bot","telegram-chat-bot","ubos-tech","whatsapp-bot"],"created_at":"2024-11-19T11:13:19.705Z","updated_at":"2025-05-15T08:32:35.509Z","avatar_url":"https://github.com/UBOS-tech.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://ubos.tech/wp-content/uploads/2024/07/data_types_image.png\" alt=\"logo\" width=\"500\" height=\"auto\" /\u003e\n\n# AI Chatbot Starter Kit\n\nAn  README for template AI Chatbot Starter Kit\n\n[![contributors](https://img.shields.io/badge/contributors-3-blue)](https://github.com/UBOS-tech/AI-Chatbot-Starter-Kit/graphs/contributors)\n[![last commit](https://img.shields.io/github/last-commit/UBOS-Asset-Store/Generative-AI-Bot-NR?color=blue)](https://github.com/UBOS-Asset-Store/Generative-AI-Bot-NR/commits/master)\n[![stars](https://img.shields.io/github/stars/UBOS-tech/AI-Chatbot-Starter-Kit?style=social)](https://github.com/UBOS-tech/AI-Chatbot-Starter-Kit/stargazers)\n[![open issues](https://img.shields.io/github/issues/UBOS-tech/AI-Chatbot-Starter-Kit?color=blue)](https://github.com/UBOS-tech/AI-Chatbot-Starter-Kit/issues)\n[![license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/UBOS-tech/AI-Chatbot-Starter-Kit/blob/main/LICENSE.txt)\n\n#### [View Demo](https://platform.ubos.tech/?aiBotV3=true) · [Report Bug](https://github.com/UBOS-tech/AI-Chatbot-Starter-Kit/issues) · [Request Feature](https://github.com/UBOS-tech/AI-Chatbot-Starter-Kit/issues)\n\n[![Deploy on UBOS](https://ubos.tech/wp-content/uploads/2024/07/deploy_ubos.svg)](https://platform.ubos.tech/?templateId=65397499fe34080011cedbb5)\n\n\u003c/div\u003e\n\n## 📔 Table of Contents\n\n- [:star2: About the Project](#star2-about-the-project)\n  - [:space_invader: Built With](#space_invader-built-with)\n  - [:package: Dependencies](#package-dependencies)\n  - [:dart: Features](#dart-features)\n  - [:key: Environment Variables](#key-environment-variables)\n- [:toolbox: Getting Started](#toolbox-getting-started)\n  - [:bangbang: Prerequisites](#bangbang-prerequisites)\n  - [:gear: Installation](#gear-installation)\n- [:eyes: Usage](#eyes-usage)\n- [:compass: Roadmap](#compass-roadmap)\n- [:wave: Contributing](#wave-contributing)\n- [:warning: License](#warning-license)\n- [:handshake: Contact](#handshake-contact)\n- [:gem: Acknowledgements](#gem-acknowledgements)\n\n\n## :star2: About the Project\nThe AI Bot – Custom GPT project, built by the UBOS team, leverages Node-RED for workflow orchestration, MongoDB for scalable data storage, and an intuitive UI based on Appsmith. This project empowers users to create, customize, and deploy advanced chatbots with ease.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://ubos.tech/wp-content/uploads/2023/07/demo_pages_analytics.png\" alt=\"demo_pages_analytics\" width=\"30%\" /\u003e\n  \u003cimg src=\"https://ubos.tech/wp-content/uploads/2024/07/20240726-143713-jpeg.webp\" alt=\"start page\" width=\"30%\" /\u003e\n  \u003cimg src=\"https://ubos.tech/wp-content/uploads/2023/07/demo_pages_setupconfig.png\" alt=\"start page\" width=\"30%\" /\u003e\n\u003c/div\u003e\n\n\n### :space_invader: Built With\n\n- [AppSmith](https://github.com/UBOS-Asset-Store/Generative-AI-Bot-UI) \n- [Node-RED](https://github.com/UBOS-Asset-Store/Generative-AI-Bot-NR)\n- [MongoDB](https://www.mongodb.com/)\n- [ChromaDB](https://www.trychroma.com/)\n- [Pinecone](https://www.pinecone.io/)\n\n![Technology Stack](https://ubos.tech/wp-content/uploads/2024/07/ubos_example-1.png)\n\n## :package: Dependencies\n\nOur project relies on several Node-RED nodes and additional libraries. Below is a list of the key dependencies:\n\n### Node-RED Nodes\n- `node-red-contrib-fs`: `1.4.1` - File system operations\n- `node-red-contrib-loop-processing`: `0.5.1` - Loop processing\n- `node-red-contrib-openai-ubos`: `1.0.4` - OpenAI integration\n- `node-red-contrib-telegrambot`: `15.1.9` - Telegram bot integration\n- `node-red-node-mongodb`: `0.2.5` - MongoDB integration\n- `node-red-contrib-pdfparse`: `1.0.6` - PDF parsing\n- `node-red-contrib-pinecone`: `1.0.7` - Pinecone integration\n- `node-red-contrib-chromadb`: `1.0.0` - Chroma DB integration\n\n### Libraries\n- `jsdom`: `22.1.0` - JavaScript DOM manipulation\n- `@martip/node-red-xlsx`: `1.0.2` - XLSX file handling\n- `chromadb`: `1.5.11` - Chroma DB client\n- `openai`: `4.14.2` - OpenAI API client\n- `moment`: `2.29.4` - Date and time manipulation\n- `bcrypt`: `5.1.1` - Password hashing\n\nPlease ensure these dependencies are installed and properly configured to utilize the full capabilities of the AI Bot.\n\n### :dart: Features\n\n- `Multiple LLM Models: GPT-4o, GPT-4o Mini, Claude 3.5, Llama 3.1`\n- `Multi-Language Support`\n- `Unlimited Knowledge Bases`\n- `AI Chatbot Personality Configuration`\n- `Unlimited Chatbots`\n- `Use Your Own OpenAI API Key`\n- `Seamless Integration`\n\n### :key: Environment Variables\n\n**Node-RED Environment Variables**\n- `nodered`\n- `uiUrl`\n- `VECTORDB-CHROMA-HOST-NAME`\n- `AIBOTDB-MONGO-HOST-NAME`\n- `AIBOTDB-MONGO-DB-NAME`\n- `AIBOTDB-MONGO-USER-NAME`\n- `AIBOTDB-MONGO-PASSWORD`\n- `OPENAI-KEY`\n- `PINECONE-INDEX`\n- `PINECONE-API-KEY`\n- `PINECONE-URL`\n\n**UI Environment Variables**\n- `uiUrl`\n- `nodeUrl`\n\n## :toolbox: Getting Started\n\n### :bangbang: Prerequisites\n\n- Sign up for a free [UBOS](https://platform.ubos.tech/) account.\n- Ensure you have a server with at least 2GB of RAM and 1 CPU.\n\n### :gear: Installation\n\n**White Label**\n1. Open the Template Manager on the UBOS platform and search for \"AI Chatbot Starter Kit\" or use [this direct link](https://platform.ubos.tech/?templateId=6683ed1f52da610011914678).\n2. Select your desired server plan.\n3. Click on \"Install.\"\n4. Wait 5-7 minutes for the installation to complete and all settings to be applied.\n\n**SAAS**\n1. Access the project using [this link](https://platform.ubos.tech/?aiBotV3=true).\n\n\n## :eyes: Usage\n\n### ADA-VectorDB-ChatGPT\n\n![image](https://github.com/user-attachments/assets/29199ec9-a548-43c1-9fff-8dc51b942c65)\n\n**Key Components**\n\n1. **Input Data Unification**: Consolidates various configuration parameters and user input into a standardized format.\n2. **Embedding Generation**: Utilizes OpenAI's text-embedding-ada-002 model to create embeddings for user queries.\n3. **Vector Database Integration**: Supports both Pinecone and Chroma for semantic search functionality.\n4. **GPT Model Integration**: Uses OpenAI's chat completion API to generate responses based on retrieved context and user queries.\n5. **History Management**: Saves conversation history for potential future use or analysis.\n\n**Flow Structure**\n\n1. **Input Processing**: \n   - Unifies input data (BOT_NAME, DATABASE settings, AI_SETTINGS, etc.)\n   - Generates embeddings for user queries\n\n2. **Vector Database Query**:\n   - Determines the appropriate vector database (Pinecone or Chroma)\n   - Queries the database with the generated embedding\n\n3. **Context Creation**:\n   - Processes retrieved vectors to create a context for the GPT model\n\n4. **GPT Query**:\n   - Formulates a prompt including the context and user query\n   - Sends the prompt to OpenAI's chat completion API\n\n5. **Response Handling**:\n   - Processes the GPT response\n   - Saves conversation history\n   - Sends the response back to the user\n\n**Key Functions**\n\n- `Input Data Unification`: Standardizes input data format\n- `create vector`: Prepares the context for GPT based on vector database results\n- `send to user from chat`: Processes GPT response and prepares it for the user\n- `save history`: Stores conversation details for future reference\n\n**Integrations**\n\n- OpenAI API: For embedding generation and GPT-based response generation\n- Pinecone: Vector database for semantic search\n- Chroma: Alternative vector database option\n- Telegram Bot API: For sending typing indicators and messages (implied from the code)\n\n**Configuration**\n\nThe flow requires several configuration parameters, including:\n\n- OpenAI API key\n- Vector database credentials (Pinecone or Chroma)\n- Bot settings (name, prepared messages, AI settings)\n- Telegram bot token (for sending messages and typing indicators)\n\n**Error Handling**\n\nThe flow includes basic error handling, particularly for API failures and unexpected responses. It uses prepared error messages when issues occur.\n\n**Debugging**\n\nMultiple debug nodes are included throughout the flow for monitoring and troubleshooting purposes.\n\n### **RAG Architecture**\n\nOur AI Bot utilizes a Retrieval-Augmented Generation (RAG) architecture to provide accurate and context-aware responses. \n\n![image](https://github.com/user-attachments/assets/f83c4ee5-0e94-4330-9795-fe9c6e8f6c41)\n\n## :compass: Roadmap\n\n- [x] Implement more robust error handling and logging.\n- [x] Multi-Language Support.\n- [x] Add Models: GPT-4o, GPT-4o Mini.\n- [ ] Add support for additional vector databases.\n- [ ] Enhance the context creation process for more accurate responses.\n- [ ] Implement rate limiting to prevent API overuse.\n- [x] Integrate additional Large Language Models (LLMs).\n- [ ] Add CRM integration.\n\n\n## :wave: Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\". Don't forget to give the project a star! Thanks again!\n\n## :warning: License\n\nThis source code is licensed under the MIT license.  See [LICENSE.txt](https://github.com/UBOS-tech/AI-Chatbot-Starter-Kit/blob/main/LICENSE.txt) for more information\n\n## :handshake: Contact\n\nUBOS Team - [@ubos_tech](https://twitter.com/ubos_tech) - [support@ubos.tech](mailto:support@ubos.tech)\n\nProject Link: [AI-Chatbot-Starter-Kit](https://github.com/UBOS-tech/AI-Chatbot-Starter-Kit)\n\nDiscord: [Discord Community](https://discord.gg/xj6xnmG7KZ)\n\n## :gem: Acknowledgements\n\n- [Working with Chroma DB](https://community.ubos.tech/dmytro_mytsak/how-to-work-with-chroma-db-4oe)\n- [Training Bots with Different Types of Sources](https://community.ubos.tech/vika/how-to-training-bot-by-different-types-of-source-46h9)\n- [ChatGPT Prompt Configuration](https://community.ubos.tech/vika/chatgpt-prompt-configuration-14p2)\n- [Setting Up a Messenger Bot: A Step-by-Step Guide](https://community.ubos.tech/olha/setting-up-a-messenger-bot-a-step-by-step-guide-2hk4)\n- [Setting Up an Instagram Bot: A Step-by-Step Guide](https://community.ubos.tech/olha/setting-up-an-instagram-bot-a-step-by-step-guide-k95)\n- [Guide to Setting Up a WhatsApp Bot on Facebook API](https://community.ubos.tech/olha/step-by-step-guide-setting-up-whatsapp-bot-on-facebook-api-gn3)\n- [Working with Large Files in AI Chatbots](https://community.ubos.tech/vika/working-with-large-files-in-ai-chat-bot-2aap)\n- [Customer Support Chatbot](https://community.ubos.tech/vika/customersupportchatbot-1ac8)\n\nAdditional Resources:\n- [7-Minute Guide to Training Custom AI Chatbots with a Private Knowledge Base](#) \n- [Getting Started with UBOS.tech: A Comprehensive Platform Guide](#) – Platform overview and API connection.\n- [Build AI-Powered CRUD App with Node-RED, Appsmith, MongoDB, and OpenAI API | Course Intro](#) – Guide to building CRUD applications.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubos-tech%2Fai-chatbot-starter-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubos-tech%2Fai-chatbot-starter-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubos-tech%2Fai-chatbot-starter-kit/lists"}