Skip to content

AhmadHammad21/RAG-ChatBot

Repository files navigation

🤖 Chatbot

🛠️ Installation & Setup

1. Clone the Repository & Install Dependencies

Clone the repository

git clone https://github.com/AhmadHammad21/AI-Agent.git
cd AI-Agent

2. Create and activate a virtual environment

You can use anaconda environment as well

Windows

python -m venv venv
venv/Scripts/activate

Linux/macOS

python3 -m venv venv
source venv/bin/activate

Install dependencies

pip install -r requirements.txt

3. Add OpenAI API Key

Create a .env file and add your API key and project name:

OPENAI_API_KEY=""
MONGODB_URL="mongodb://34.173.119.32/"
MONGODB_DATABASE="ai-agent"
MONGODB_COLLECTION="chatbot"

🚀 Running the Chatbot

Run the Docker Compose

sudo docker-compose up --build

Run the FastAPI Server

uvicorn main:app --reload --host 0.0.0.0 --port 5000

Run the Streamlit Chatbot UI

streamlit run app.py

Credits

Most of the project structure was inspirted by Abu Bakr Soliman Mini Rag Series.

About

OpenAI/ HuggingFace full RAG ChatBot integrated with MongoDB to save short and long term data. LangChain Tools, FAISS, FastAPI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors