An open API service indexing awesome lists of open source software.

https://github.com/sanatren/Azazel

Supercharge GPT-3.5 Turbo with RAG, image analysis (GPT-4o vision), code execution, and web search. Transform it into a lean, multimodal powerhouseβ€”smarter, faster, and more versatile, without the heavyweight cost.
https://github.com/sanatren/Azazel

langchain-python openai openai-vision rag-memory supabase whisper

Last synced: 5 months ago
JSON representation

Supercharge GPT-3.5 Turbo with RAG, image analysis (GPT-4o vision), code execution, and web search. Transform it into a lean, multimodal powerhouseβ€”smarter, faster, and more versatile, without the heavyweight cost.

Awesome Lists containing this project

README

          

# πŸ€– [Azazel AI](https://brave-comfort-production-f62d.up.railway.app/) - Advanced AI Assistant

Modern, full-featured AI assistant with beautiful ChatGPT-like interface, document processing, web search, and code execution.

[Use azazel from here](https://brave-comfort-production-f62d.up.railway.app/)

![License](https://img.shields.io/badge/license-MIT-blue.svg)
![Python](https://img.shields.io/badge/python-3.12-blue.svg)
![FastAPI](https://img.shields.io/badge/FastAPI-0.109-green.svg)

## ✨ Features

### 🎯 Core Capabilities
- **πŸ’¬ Intelligent Chat** - Natural conversations powered by OpenAI GPT-4
- **🌐 Web Search** - Real-time information from Google with intelligent query optimization
- **πŸ“„ Document Processing** - Upload and query PDFs, DOCX, Excel, PowerPoint
- **πŸ–ΌοΈ Vision Analysis** - Analyze and discuss images using GPT-4o-mini vision
- **πŸ’» Code Execution** - Safe Python code generation and execution
- **🎭 Personality Modes** - Customizable AI personalities and tones
- **🌍 Multi-language** - Support for multiple languages
- **🎀 Speech Integration** - Voice input using OpenAI Whisper

### πŸš€ Technical Features
- **Real-time Streaming** - See responses as they're generated
- **RAG (Retrieval-Augmented Generation)** - Context-aware responses from your documents
- **Session Management** - Persistent chat history with Supabase
- **Sentiment Analysis** - Emotion detection and adaptive responses
- **Model Switching** - GPT-4, GPT-4 Turbo, or GPT-4o-mini based on your needs
- **Modern UI** - Beautiful ChatGPT-like interface with Tailwind CSS
- **Mobile Responsive** - Works perfectly on all devices

## πŸ—οΈ Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Frontend (HTML/CSS/JS) β”‚
β”‚ β€’ Modern ChatGPT-like UI β”‚
β”‚ β€’ Tailwind CSS styling β”‚
β”‚ β€’ Real-time streaming β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ HTTP/SSE
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Backend (FastAPI) β”‚
β”‚ β€’ RESTful APIs β”‚
β”‚ β€’ Streaming responses β”‚
β”‚ β€’ Document processing β”‚
β”‚ β€’ Web search integration β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ OpenAI API β”‚ β”‚ Google Search β”‚
β”‚ β€’ GPT-4 β”‚ β”‚ β€’ Custom CSE β”‚
β”‚ β€’ Vision β”‚ β”‚ β€’ Wikipedia β”‚
β”‚ β€’ Whisper β”‚ β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## πŸš€ Quick Start

### Option 1: Docker (Recommended)

```bash
# Clone the repository
git clone
cd Azazel

# Create environment file
cat > .env << EOF
GOOGLE_API_KEY=your_google_api_key
GOOGLE_CSE_ID=your_google_cse_id
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
EOF

# Start with Docker Compose
docker-compose up -d

# Access the app
# Frontend: http://localhost:8080
# API Docs: http://localhost:8000/docs
```

### Option 2: Local Development

**Backend:**
```bash
cd api
pip install -r requirements.txt
uvicorn api.main:app --reload --port 8000
```

**Frontend:**
```bash
cd frontend
python server.py
# Visit http://localhost:8080
```

## 🌐 Deploy to Railway

See [DEPLOY.md](DEPLOY.md) for complete deployment instructions.

**Quick Steps:**
1. Push to GitHub
2. Connect to Railway
3. Deploy backend + frontend services
4. Add environment variables
5. Done! πŸŽ‰

## πŸ”§ Configuration

### Environment Variables

```env
# Required for web search
GOOGLE_API_KEY=AIzaSy...
GOOGLE_CSE_ID=0123456789...

# Optional for chat history
SUPABASE_URL=https://...
SUPABASE_KEY=eyJhbGci...
```

### Get API Keys

1. **OpenAI** (Users provide their own):
- https://platform.openai.com/api-keys

2. **Google Search**:
- API Key: https://console.cloud.google.com/apis/credentials
- CSE ID: https://programmablesearchengine.google.com/

3. **Supabase** (Optional):
- https://supabase.com/dashboard

## πŸ“š API Endpoints

- `POST /api/chat/message` - Send a message
- `POST /api/chat/stream` - Stream response
- `POST /api/chat/code` - Execute code
- `POST /api/documents/upload` - Upload file
- `POST /api/search/web` - Web search
- `GET /health` - Health check

Full API docs: `http://localhost:8000/docs`

## 🎨 Why Azazel?

**Supercharging AI Models** - Azazel elevates GPT-4 and legacy models to the next level by integrating:
- **RAG** - Chat with your documents
- **Vision** - Analyze images and screenshots
- **Code Execution** - Run Python code safely
- **Web Search** - Access real-time information
- **Multi-modal** - Handle text, images, code, and documents

All in one beautiful, easy-to-use interface without the heavyweight price tag!

## πŸ› οΈ Built With

- **FastAPI** - Modern, fast Python web framework
- **LangChain** - AI orchestration and RAG
- **OpenAI** - GPT-4, Vision, Whisper
- **Tailwind CSS** - Beautiful, responsive UI
- **Docker** - Containerization
- **Railway** - Easy deployment

## πŸ“ License

MIT License - see [LICENSE](LICENSE) file for details

## πŸ™ Acknowledgments

- OpenAI for GPT-4 API
- FastAPI for amazing web framework
- Tailwind CSS for beautiful styling
- LangChain for AI orchestration
- Railway for easy deployment

---

**Built with ❀️ for the AI community**

[⭐ Star on GitHub](https://github.com/your-repo) β€’ [πŸ› Report Bug](https://github.com/your-repo/issues) β€’ [✨ Request Feature](https://github.com/your-repo/issues)