# Hotel Chatbot APIs

## Getting Started

Follow the steps below to set up and run the application on your local machine.

## 1) Install Python (3.11)

On Ubuntu/Debian:

```bash
sudo apt-get update
sudo apt-get install -y python3.11 python3-pip python3-venv
python3.11 --version
```

## 2) Install Conda (Miniconda/Anaconda)

Download and install Conda for Linux, then initialize it for your shell:

```bash
# Example using Miniconda (adjust the filename/path as needed)
bash ~/Downloads/Miniconda3-latest-Linux-x86_64.sh

# Initialize conda for your current shell
~/miniconda3/bin/conda init
```

Close and reopen the terminal after `conda init`.

## 3) Create and activate the `pms-bot` environment

```bash
conda create -n ibe-bot python=3.12 -y
conda activate ibe-bot
```

## 4) Install dependencies

From the project root:

```bash
pip install -r requirements.txt
```

## 5) Configure environment variables

```bash
cp .env.sample .env
```

Edit `.env` and set required values (API keys, DB URL, Pinecone settings, etc.).

## 6) Create `output.log` and start the server

From the project root:

```bash
touch output.log
chmod 666 output.log
make nohup
```

To stop the server:

```bash
make stop
```

## API Endpoints

Base URL:
`http://localhost:9000/ibe-bot-apis`

- `POST /stream` (SSE streaming chat)
  - Example:
    ```bash
    curl -N -X POST "http://localhost:9000/ibe-bot-apis/stream" \
      -H "Content-Type: application/json" \
      -d '{"question":"Hello"}'
    ```
- `GET /health-check`

Swagger docs:
- `http://localhost:9000/docs`

