Skip to content

πŸ€– QuΓ©AI is LLM-powered ChatBot for your website. Get a personal customer support and sales manager for free.

License

Notifications You must be signed in to change notification settings

KazKozDev/ChatBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

QuΓ©AI - Smart LLM Chatbot

A knowledge-based chatbot designed for seamless website integration, leveraging business information from text files to provide automated customer support. This chatbot is ideal for small businesses, e-commerce platforms, and customer service teams who need an efficient way to handle inquiries 24/7. It is particularly useful for automating responses to common questions, reducing response times, and improving user experience.

demochat

Why Choose This Chatbot?

  • Unique Feature: QuΓ©AI uses Natural Language Processing to understand free-form customer queries, recognize various phrasings, slang, and context β€” enabling natural and seamless conversations.
  • Key Benefits: Offers Contact Management, Feedback Collection, Multilingual Support, and Sales Assistance.
  • Distinction: Unlike standard chatbots, it supports multiple Large Language Models (LLMs) including Ollama (local), OpenAI, Anthropic, and Google, allowing flexibility in performance and cost based on your needs.

Features

  • Knowledge Management: Store business info in .txt files in the knowledge/ directory.
  • LLM Providers: Supports Ollama, OpenAI, Anthropic, and Google Generative AI, configurable via Admin UI or environment variables.
  • Semantic Search: Utilizes sentence transformers and ChromaDB for relevant query responses.
  • Admin UI: Web interface (/admin) to manage knowledge, configure LLM/model, customize widget appearance, and handle backups.
  • Docker Support: Deploy with Docker and Docker Compose.
  • WordPress Integration: Experimental plugin structure in wordpress/chatbot/.
  • Monitoring: Basic Prometheus setup included.

Installation

Docker (Recommended)

  1. Clone Repository:
    git clone https://github.com/KazKozDev/ChatBot.git
    cd ChatBot
  2. Configure Environment (optional): Create a .env file for API keys (see settings_manager.py for variables like CHATBOT_PROVIDER, CHATBOT_MODEL_NAME, CHATBOT_API_KEY). Defaults to Ollama if not set.
  3. Build and Run:
    docker-compose up --build -d
    Server typically available at http://localhost:8000.

Manual Installation

  1. Prerequisites: Python 3.9+, Ollama (if using locally), terminal access.
  2. Clone Repository:
    git clone https://github.com/KazKozDev/ChatBot.git
    cd ChatBot
  3. Virtual Environment:
    python3 -m venv venv
    source venv/bin/activate  # Windows: `venv\Scripts\activate`
  4. Install Dependencies:
    pip install -r requirements.txt
  5. Configure Environment (optional): See Docker step 2.
  6. Prepare Knowledge Base: Add .txt files to knowledge/ directory for topics (e.g., about.txt, services.txt). An example.txt is created if empty on first run.
  7. Run Server:
    uvicorn server:app --host 0.0.0.0 --port 8000 --reload
    Note: --reload is for development; remove for production. Ollama models are pulled if needed.

Usage

Chat Widget Integration

Add this script before </body> tag in HTML:

<script>
(function() {
    const serverUrl = 'http://localhost:8000'; // Replace with your server URL
    const script = document.createElement('script');
    script.src = serverUrl + '/static/chat-widget.js';
    script.async = true;
    document.head.appendChild(script);

    script.onload = function() {
        ChatWidget.init({
            botName: 'Assistant',
            apiUrl: serverUrl + '/chat'
        });
    };
})();
</script>

Note: Update http://localhost:8000 to your server's URL.

Admin Dashboard

Access at /admin (e.g., http://localhost:8000/admin) to:

  • Configure LLM provider and model, input API keys.
  • Manage knowledge files (view, edit, delete).
  • Customize chat widget appearance.
  • Handle backups.

Requirements

  • Python 3.9+
  • Docker & Docker Compose (for Docker setup)
  • Ollama (for local LLM)
  • Dependencies in requirements.txt
  • ~2GB+ RAM (for local LLMs)

Project Structure

ChatBot/
β”œβ”€β”€ knowledge/          # Knowledge base .txt files
β”œβ”€β”€ static/             # Static assets (JS, CSS)
β”œβ”€β”€ templates/          # HTML templates (Widget, Admin UI)
β”‚   └── admin/          # Admin UI templates & files
β”œβ”€β”€ wordpress/          # Experimental WordPress plugin
β”œβ”€β”€ .env                # Environment variables (optional)
β”œβ”€β”€ backup_manager.py   # Backup/restore logic
β”œβ”€β”€ chatbot.py          # Chatbot logic, LLM integration
β”œβ”€β”€ docker-compose.yml  # Docker configuration
β”œβ”€β”€ Dockerfile          # Docker build instructions
β”œβ”€β”€ knowledge_loader.py # Knowledge file processing
β”œβ”€β”€ requirements.txt    # Python dependencies
β”œβ”€β”€ server.py           # FastAPI server, API, Admin UI
└── settings_manager.py # Settings management

Contributing

Refer to PROJECT_PLAN.md for improvement areas. Follow existing code patterns and update documentation.


If you like this project, please give it a star ⭐

For questions, feedback, or support, reach out to:

Artem KK | MIT LICENSE

About

πŸ€– QuΓ©AI is LLM-powered ChatBot for your website. Get a personal customer support and sales manager for free.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published