Skip to content

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.

License

Notifications You must be signed in to change notification settings

UBOS-tech/AI-Chatbot-Starter-Kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo

AI Chatbot Starter Kit

An README for template AI Chatbot Starter Kit

contributors last commit stars open issues license

Deploy on UBOS

πŸ“” Table of Contents

🌟 About the Project

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.

demo_pages_analytics start page start page

πŸ‘Ύ Built With

Technology Stack

πŸ“¦ Dependencies

Our project relies on several Node-RED nodes and additional libraries. Below is a list of the key dependencies:

Node-RED Nodes

  • node-red-contrib-fs: 1.4.1 - File system operations
  • node-red-contrib-loop-processing: 0.5.1 - Loop processing
  • node-red-contrib-openai-ubos: 1.0.4 - OpenAI integration
  • node-red-contrib-telegrambot: 15.1.9 - Telegram bot integration
  • node-red-node-mongodb: 0.2.5 - MongoDB integration
  • node-red-contrib-pdfparse: 1.0.6 - PDF parsing
  • node-red-contrib-pinecone: 1.0.7 - Pinecone integration
  • node-red-contrib-chromadb: 1.0.0 - Chroma DB integration

Libraries

  • jsdom: 22.1.0 - JavaScript DOM manipulation
  • @martip/node-red-xlsx: 1.0.2 - XLSX file handling
  • chromadb: 1.5.11 - Chroma DB client
  • openai: 4.14.2 - OpenAI API client
  • moment: 2.29.4 - Date and time manipulation
  • bcrypt: 5.1.1 - Password hashing

Please ensure these dependencies are installed and properly configured to utilize the full capabilities of the AI Bot.

🎯 Features

  • 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

πŸ”‘ Environment Variables

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

🧰 Getting Started

‼️ Prerequisites

  • Sign up for a free UBOS account.
  • Ensure you have a server with at least 2GB of RAM and 1 CPU.

βš™οΈ Installation

White Label

  1. Open the Template Manager on the UBOS platform and search for "AI Chatbot Starter Kit" or use this direct link.
  2. Select your desired server plan.
  3. Click on "Install."
  4. Wait 5-7 minutes for the installation to complete and all settings to be applied.

SAAS

  1. Access the project using this link.

πŸ‘€ Usage

ADA-VectorDB-ChatGPT

image

Key Components

  1. Input Data Unification: Consolidates various configuration parameters and user input into a standardized format.
  2. Embedding Generation: Utilizes OpenAI's text-embedding-ada-002 model to create embeddings for user queries.
  3. Vector Database Integration: Supports both Pinecone and Chroma for semantic search functionality.
  4. GPT Model Integration: Uses OpenAI's chat completion API to generate responses based on retrieved context and user queries.
  5. History Management: Saves conversation history for potential future use or analysis.

Flow Structure

  1. Input Processing:

    • Unifies input data (BOT_NAME, DATABASE settings, AI_SETTINGS, etc.)
    • Generates embeddings for user queries
  2. Vector Database Query:

    • Determines the appropriate vector database (Pinecone or Chroma)
    • Queries the database with the generated embedding
  3. Context Creation:

    • Processes retrieved vectors to create a context for the GPT model
  4. GPT Query:

    • Formulates a prompt including the context and user query
    • Sends the prompt to OpenAI's chat completion API
  5. Response Handling:

    • Processes the GPT response
    • Saves conversation history
    • Sends the response back to the user

Key Functions

  • Input Data Unification: Standardizes input data format
  • create vector: Prepares the context for GPT based on vector database results
  • send to user from chat: Processes GPT response and prepares it for the user
  • save 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.

RAG Architecture

Our AI Bot utilizes a Retrieval-Augmented Generation (RAG) architecture to provide accurate and context-aware responses.

image

🧭 Roadmap

  • 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.

πŸ‘‹ Contributing

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!

⚠️ License

This source code is licensed under the MIT license. See LICENSE.txt for more information

🀝 Contact

UBOS Team - @ubos_tech - [email protected]

Project Link: AI-Chatbot-Starter-Kit

Discord: Discord Community

πŸ’Ž Acknowledgements

Additional Resources:

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published