- 🌟 About the Project
- 🧰 Getting Started
- 👀 Usage
- 🧭 Roadmap
- 👋 Contributing
⚠️ License- 🤝 Contact
- 💎 Acknowledgements
The 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.
Our project relies on several Node-RED nodes and additional libraries. Below is a list of the key dependencies:
node-red-contrib-fs
:1.4.1
- File system operationsnode-red-contrib-loop-processing
:0.5.1
- Loop processingnode-red-contrib-openai-ubos
:1.0.4
- OpenAI integrationnode-red-contrib-telegrambot
:15.1.9
- Telegram bot integrationnode-red-node-mongodb
:0.2.5
- MongoDB integrationnode-red-contrib-pdfparse
:1.0.6
- PDF parsingnode-red-contrib-pinecone
:1.0.7
- Pinecone integrationnode-red-contrib-chromadb
:1.0.0
- Chroma DB integration
jsdom
:22.1.0
- JavaScript DOM manipulation@martip/node-red-xlsx
:1.0.2
- XLSX file handlingchromadb
:1.5.11
- Chroma DB clientopenai
:4.14.2
- OpenAI API clientmoment
:2.29.4
- Date and time manipulationbcrypt
:5.1.1
- Password hashing
Please ensure these dependencies are installed and properly configured to utilize the full capabilities of the AI Bot.
Multiple LLM Models: GPT-4o, GPT-4o Mini, Claude 3.5, Llama 3.1
Multi-Language Support
Unlimited Knowledge Bases
AI Chatbot Personality Configuration
Unlimited Chatbots
Use Your Own OpenAI API Key
Seamless Integration
Node-RED Environment Variables
nodered
uiUrl
VECTORDB-CHROMA-HOST-NAME
AIBOTDB-MONGO-HOST-NAME
AIBOTDB-MONGO-DB-NAME
AIBOTDB-MONGO-USER-NAME
AIBOTDB-MONGO-PASSWORD
OPENAI-KEY
PINECONE-INDEX
PINECONE-API-KEY
PINECONE-URL
UI Environment Variables
uiUrl
nodeUrl
- Sign up for a free UBOS account.
- Ensure you have a server with at least 2GB of RAM and 1 CPU.
White Label
- Open the Template Manager on the UBOS platform and search for "AI Chatbot Starter Kit" or use this direct link.
- Select your desired server plan.
- Click on "Install."
- Wait 5-7 minutes for the installation to complete and all settings to be applied.
SAAS
- Access the project using this link.
Key Components
- Input Data Unification: Consolidates various configuration parameters and user input into a standardized format.
- Embedding Generation: Utilizes OpenAI's text-embedding-ada-002 model to create embeddings for user queries.
- Vector Database Integration: Supports both Pinecone and Chroma for semantic search functionality.
- GPT Model Integration: Uses OpenAI's chat completion API to generate responses based on retrieved context and user queries.
- History Management: Saves conversation history for potential future use or analysis.
Flow Structure
-
Input Processing:
- Unifies input data (BOT_NAME, DATABASE settings, AI_SETTINGS, etc.)
- Generates embeddings for user queries
-
Vector Database Query:
- Determines the appropriate vector database (Pinecone or Chroma)
- Queries the database with the generated embedding
-
Context Creation:
- Processes retrieved vectors to create a context for the GPT model
-
GPT Query:
- Formulates a prompt including the context and user query
- Sends the prompt to OpenAI's chat completion API
-
Response Handling:
- Processes the GPT response
- Saves conversation history
- Sends the response back to the user
Key Functions
Input Data Unification
: Standardizes input data formatcreate vector
: Prepares the context for GPT based on vector database resultssend to user from chat
: Processes GPT response and prepares it for the usersave history
: Stores conversation details for future reference
Integrations
- OpenAI API: For embedding generation and GPT-based response generation
- Pinecone: Vector database for semantic search
- Chroma: Alternative vector database option
- Telegram Bot API: For sending typing indicators and messages (implied from the code)
Configuration
The flow requires several configuration parameters, including:
- OpenAI API key
- Vector database credentials (Pinecone or Chroma)
- Bot settings (name, prepared messages, AI settings)
- Telegram bot token (for sending messages and typing indicators)
Error Handling
The flow includes basic error handling, particularly for API failures and unexpected responses. It uses prepared error messages when issues occur.
Debugging
Multiple debug nodes are included throughout the flow for monitoring and troubleshooting purposes.
Our AI Bot utilizes a Retrieval-Augmented Generation (RAG) architecture to provide accurate and context-aware responses.
- Implement more robust error handling and logging.
- Multi-Language Support.
- Add Models: GPT-4o, GPT-4o Mini.
- Add support for additional vector databases.
- Enhance the context creation process for more accurate responses.
- Implement rate limiting to prevent API overuse.
- Integrate additional Large Language Models (LLMs).
- Add CRM integration.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If 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!
This source code is licensed under the MIT license. See LICENSE.txt for more information
UBOS Team - @ubos_tech - support@ubos.tech
Project Link: AI-Chatbot-Starter-Kit
Discord: Discord Community
- Working with Chroma DB
- Training Bots with Different Types of Sources
- ChatGPT Prompt Configuration
- Setting Up a Messenger Bot: A Step-by-Step Guide
- Setting Up an Instagram Bot: A Step-by-Step Guide
- Guide to Setting Up a WhatsApp Bot on Facebook API
- Working with Large Files in AI Chatbots
- Customer Support Chatbot
Additional Resources:
- 7-Minute Guide to Training Custom AI Chatbots with a Private Knowledge Base
- Getting Started with UBOS.tech: A Comprehensive Platform Guide – Platform overview and API connection.
- Build AI-Powered CRUD App with Node-RED, Appsmith, MongoDB, and OpenAI API | Course Intro – Guide to building CRUD applications.