How drizgolovicha/ai-chatbot-js works
Project Type and Purpose
• This is a full-stack, Retrieval-Augmented Generation (RAG) AI assistant.
• Backend: Python FastAPI serving as the API and RAG pipeline.
• Frontend: Pure JavaScript UI (chat.html, chat.js) embeddable into any website.
• Data pipeline: Scripts to scrape, enrich, and ingest content into a local vector store (ChromaDB).
• Pluggable LLM providers: Local (Ollama/Llama) or remote (Together.ai).
File Structure Analysis
• Top level
• main.py – FastAPI entrypoint.
• pyproject.toml / requirements.txt – dependencies.
• data/links.txt – seed URLs for scraping.
• public/ – static UI files (HTML, JS, CSS, libs).
• Directories
• scripts/ – ETL pipeline: scrapper.py → ingest.py → text_enrichment.py → terminal.py.
• providers/ – abstraction for AI providers (ollama.py, together.py).
• models/ – domain models and index logic for vector DB.
• utils/ – docstore and indexing utilities.
• dialogs/ & docs/ – version control placeholders.
README Insights
• RAG-based pipeline: scrape web pages → markdown → embeddings → ChromaDB/SQLite → API.
• LLM integration: local or cloud.
• UI injection: public/chat.html or iframe.html.