File size: 2,557 Bytes
324f5c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# RNGAI-WEB Chatbot

This is an AI-powered chatbot for RNG Patel Institute of Technology (RNGPIT) that uses RAG (Retrieval Augmented Generation) to answer questions about courses, admissions, facilities, placements, and campus life.

## Features

- πŸŽ“ Comprehensive information about RNGPIT
- πŸ€– Powered by Groq AI (LLaMA models)
- πŸ“š RAG-based knowledge retrieval
- 🎨 Beautiful, modern UI with dark/light theme
- πŸ“Š Admin dashboard with analytics
- 🐳 Docker support for easy deployment

## Setup

### 1. Clone and Install

```bash

cd RNGAI-WEB

pip install -r requirements.txt

```

### 2. Configure Environment Variables

Copy the example environment file:

```bash

copy .env.example .env

```

Then edit `.env` and add your credentials:

```env

GROQ_API_KEY=your_groq_api_key_here

SUPABASE_URL=your_supabase_url_here

SUPABASE_KEY=your_supabase_key_here

```

**Get your credentials:**
- **Groq API**: https://console.groq.com
- **Supabase**: https://supabase.com

### 3. Run the Application

**Local Development:**

```bash

python app.py

```

**Using Docker:**

```bash

docker-compose up -d

```

The application will be available at: `http://localhost:5000`

## Project Structure

```

RNGAI-WEB/

β”œβ”€β”€ app.py                 # Main Flask application

β”œβ”€β”€ requirements.txt       # Python dependencies

β”œβ”€β”€ .env                   # Environment variables (not in git)

β”œβ”€β”€ .env.example          # Environment template

β”œβ”€β”€ Dockerfile            # Docker configuration

β”œβ”€β”€ docker-compose.yml    # Docker Compose config

β”œβ”€β”€ templates/

β”‚   └── index.html        # Main chat interface

β”œβ”€β”€ static/

β”‚   └── RNGPIT.png       # College logo

└── data/

    └── link17.txt       # Knowledge base

```

## Environment Variables

| Variable | Description | Required |
|----------|-------------|----------|
| `GROQ_API_KEY` | API key from Groq Console | Yes |
| `SUPABASE_URL` | Your Supabase project URL | Yes |
| `SUPABASE_KEY` | Your Supabase API key | Yes |

## Tech Stack

- **Backend**: Flask, Python 3.11
- **AI**: Groq (LLaMA 3.3), Sentence Transformers
- **Vector DB**: ChromaDB
- **Database**: Supabase
- **Frontend**: HTML, CSS, JavaScript with Three.js

## Security

⚠️ **Important**: Never commit your `.env` file to version control. The `.env` file contains sensitive credentials and should be kept private.

## License

Private project for RNG Patel Institute of Technology