Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 1.05 KB

File metadata and controls

63 lines (47 loc) · 1.05 KB

🤖 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.