Skip to content

Latest commit

Β 

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Deployment

https://angad2005-chatrag-main-sirokb.streamlit.app/

πŸš€ ChatRAG (Chatbot AI Agent & Knowledge Base Injector)

Streamlit LangChain HuggingFace

LLM-powered tool for working with your data files. Makes your LLM more knowledgeable using document injection and Retrieval-Augmented Generation (RAG).

🌟 Features

  • πŸ“„ Multi-Format Support: Upload PDF, DOCX, and TXT files.
  • 🧠 Smart RAG: Uses FAISS vector store and SentenceTransformers for accurate retrieval.
  • πŸ”Œ Flexible LLM Backend: Connect to any OpenAI-compatible endpoint:
    • ☁️ Cloud APIs: OpenAI, NVIDIA NIM, Together AI, Groq.
    • 🏠 Local Servers: Ollama, LM Studio, vLLM (if running on same network/machine).
  • ⚑ GPU Accelerated: Auto-detects CUDA/MPS for faster embedding generation.
  • πŸ”’ Private: Your documents are processed locally in the session memory.

πŸš€ Quick Start

1. Configure LLM Connection

In the sidebar (πŸ€– LLM Settings), enter your provider details:

Provider API Base URL API Key Example Model
OpenAI https://api.openai.com/v1 sk-... gpt-4o-mini
NVIDIA NIM https://integrate.api.nvidia.com/v1 nvapi-... meta/llama-3.1-8b-instruct
Groq https://api.groq.com/openai/v1 gsk_... llama3-8b-8192
Ollama (Local) http://localhost:11434/v1 not-needed llama3.1
LM Studio (Local) http://localhost:1234/v1 not-needed local-model

Note for Hugging Face Spaces Users: Since this Space runs in the cloud, it cannot connect to localhost on your computer. To use local models like Ollama/LM Studio, you must expose them via a tunnel (like ngrok) or use a Cloud API provider listed above.

2. Load Embedding Model

Click πŸ“‚ Load from Cache in the sidebar. This loads the lightweight all-MiniLM-L6-v2 model for creating vector embeddings of your documents.

3. Upload & Chat

  1. Upload your .pdf, .docx, or .txt files.
  2. Wait for the "Processing Complete" message.
  3. Ask questions about your documents in the chat box!

πŸ› οΈ Technical Details

  • Frontend: Streamlit
  • Backend: Python / LangChain
  • Vector Store: FAISS (Facebook AI Similarity Search)
  • Embeddings: SentenceTransformers (all-MiniLM-L6-v2)
  • Document Loaders: PyPDF, python-docx

πŸ“¦ Local Installation

If you want to run this locally with full GPU support:

git clone https://github.com/Angad2005/ChatRAG.git
cd ChatRAG

# Create virtual environment
python -m venv van1
source van1/bin/activate  # Linux/Mac
# .\van1\Scripts\activate # Windows

# Install dependencies
pip install -r requirements.txt

# Run the app
STREAMLIT_SERVER_FILE_WATCHER_TYPE=none streamlit run main.py

About

Secure local AI chatbot & knowledge injector using LLMs (Ollama, LM Studio) for real-time insights from PDFs, DOCX, CSV, and more. Keep data private, customize models, and integrate effortlessly. πŸš€ Privacy-first, multi-format, and seamless LLM integration for advanced reasoning on your terms.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages