Skip to content

A Retrieval-Augmented Generation (RAG) chatbot with a custom Whatsapp style Streamlit interface that allows users to upload documents and ask questions about their content.

License

Notifications You must be signed in to change notification settings

davutbayik/rag-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📄🔍 RAG Chatbot

A Retrieval-Augmented Generation (RAG) chatbot with a custom Whatsapp style Streamlit interface that allows users to upload documents and ask questions about their content.

Python Streamlit LangChain OpenAI License


✨ Features

  • 🤖 LLM Model Selection: Select desired LLM model from OpenAI or Gemini.
  • 📁 Multi-Format Document Upload: Supports PDF, DOCX, and TXT files.
  • 💬 Interactive Q&A: Ask questions about your uploaded documents.
  • 🎨 Custom Chat Interface: WhatsApp-like chat UI for a familiar user experience.
  • 💾 Conversation History: Download your chat history for future reference.

🖥️ Live App

👉 Live App

🧩 Tech Stack

🚀 Usage

  1. Select an LLM Model: Select an LLM model for the chatbot from the given list. List consist of OpenAI and Gemini models.
  2. Upload Documents: Use the sidebar to upload one or more documents (PDF, DOCX, or TXT).
  3. Ask Questions: Type your questions in the chat input box. The chatbot will provide answers based on the content of your uploaded documents.
  4. Download History: Click the "Download" button to save your conversation history.

🎥 Example Demo

example_demo.mp4

🛠️ Installation

  1. Clone the repository:

    git clone https://github.com/davutbayik/rag-chatbot.git
    cd rag-chatbot
  2. Create and activate a virtual environment (Optional-Recommended):

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
  4. Run the application:

    streamlit run main.py

🔑 Environment Variables

Create a .env file in the root directory with:

OPENAI_API_KEY=your_openai_api_key
GOOGLE_API_KEY=your_google_api_key

📂 Project Structure

├── main.py               # Main Streamlit application
├── document_utils.py    # Document processing and RAG functionality
├── ui_components.py     # UI styling and helper components
├── requirements.txt     # Python dependencies
├── LICENSE              # MIT License
└── README.md            # Project documentation

📄 License

This project is licensed under the terms of the MIT License.
You are free to use, modify, and distribute this software as long as you include the original license.

📬 Contact

Made with ❤️ by Davut Bayık — feel free to reach out via GitHub for questions, feedback, or collaboration ideas.


⭐ If you found this project helpful, consider giving it a star!

Happy chatting! 💬📚

Releases

No releases published

Packages

No packages published

Languages