Skip to content

petersun1937/cross-platform-chatbot-rag

Repository files navigation

CrossPlatform-TechSupport-Chatbot

A multi-platform chatbot that provides intelligent customer and tech support using OpenAI, Dialogflow, and a Retrieval-Augmented Generation (RAG) system.

Table of Contents

Features

  • Multi-platform support (Messenger, Telegram, LINE, or custom web page)
  • Document storing and chunking
  • OpenAI integration for conversational AI and text embedding/semantic search
  • Retrieval-Augmented Generation (RAG) for document-based responses
  • Context-aware responses and smart routing

Demo

How It Works

  • Users interact with the chatbot through various platforms (support FB Messenger, Telegram, LINE, or custom platform).
  • Dialogflow detects intents for common questions and support requests.
  • OpenAI generates conversational responses for unrecognized inputs.
  • Document upload, which is then chunked and stored in the database along with text embeddings.
  • The Retrieval-Augmented Generation (RAG) system fetches relevant documents for FAQs and troubleshooting.

Tech Stack

  • Frontend: React (web interaction)
  • Backend: Go (Gin framework)
  • Database: PostgreSQL
  • APIs: OpenAI API, Dialogflow, META APIs, Telegram API, LINE API
  • Cloud: Heroku (backend deployment), Github Page (frontend deployment)

Installation

  • Clone the Repository:

    git clone https://github.com/petersun1937/CrossPlatform-TechSupport-Chatbot.git
    cd CrossPlatform-TechSupport-Chatbot
  • Backend Setup:

    • Ensure Go and Python are installed:

      • Make sure that Go (version 1.16 or higher) and Python (version 3.6 or higher) are installed on your system.
      • You can verify the installation by running the following commands:
        go version
        python --version
    • Install Python packages:

      • The backend requires several Python packages for processing PDFs. To install them, run:
        pip install pdfplumber pytesseract pdf2image PyPDF2
      • These packages handle PDF text extraction and Optical Character Recognition (OCR) for images within PDFs.
  • Set up environment variables:
    • Create a .env file in the configs/ directory to store environment variables such as API keys and database configurations (refer to sample.env).

License

This project is licensed under the MIT License - see the LICENSE file for details.