No description
- HTML 52.4%
- Python 43.1%
- Shell 3.1%
- Batchfile 1.4%
Error Code System: - Add ErrorCode enum with standardized codes (E1XX-E9XX) - Add ERROR_DESCRIPTIONS registry for user-friendly messages - Add AppError exception class and helper functions - Add /api/errors endpoint for error code reference - Wrap model loading, generation functions with error codes Enhanced Shutdown: - Add 15-minute timeout with forced exit protection - Add watchdog thread for timeout monitoring - Add graceful_shutdown() with proper sequencing - Second Ctrl+C forces immediate exit - Proper exit codes on shutdown (E800, E802) Documentation: - Add complete error code reference table - Document shutdown timeout behavior |
||
|---|---|---|
| data | ||
| docs | ||
| .gitignore | ||
| index.html | ||
| README.md | ||
| run.bat | ||
| server.log | ||
| server.py | ||
| start.sh | ||
Local Unity - AI Chat + Image Generation
By Unity AI Lab | www.unityailab.com
A completely local AI assistant that runs entirely on your computer. No internet required, no data sent anywhere, 100% private.
Features
- Chat with AI - Local LLM text generation (Phi-3, Llama 3, Mistral, Qwen2)
- Generate Images - Stable Diffusion image generation (DreamShaper, Realistic Vision)
- Session Management - Save and organize chat history
- Memory System - Persistent context across sessions
- Customizable - Change the AI's personality with system prompts
- Voice Output - Text-to-speech support
- Dark UI - Hacker-themed interface
Everything runs on YOUR hardware using YOUR graphics card. No subscriptions, no API keys, no cloud services.
System Requirements
Minimum
- OS: Windows 10/11 (64-bit) or Linux
- GPU: NVIDIA GTX 1060 6GB or better (CUDA required)
- RAM: 16 GB
- Storage: 20 GB free space
- Python: 3.10 or newer
Recommended
- GPU: NVIDIA RTX 3060 12GB or better
- RAM: 32 GB
- Storage: 50 GB free space (for multiple models)
Required Software
- Python 3.10+ (check "Add to PATH" during install)
- NVIDIA GPU Drivers (latest version)
- CUDA Toolkit (12.x recommended)
Quick Start
Windows
# Double-click run.bat
run.bat
Linux/Ubuntu
chmod +x start.sh
./start.sh --setup # First time only - installs system deps
./start.sh # Start the server
First run will:
- Create virtual environment
- Install PyTorch with CUDA
- Install llama-cpp-python with CUDA
- Install diffusers for image generation
- Start server at http://localhost:8080
- Auto-open browser (Windows only)
How It Works
You type a message
|
Browser sends it to the server (server.py)
|
Server sends it to the AI model on your GPU
|
AI thinks and generates a response
|
Response appears in your browser
File Structure
LocalUnity/
├── run.bat # Windows launcher
├── start.sh # Linux/Ubuntu launcher
├── server.py # Flask server
├── index.html # Web interface
├── data/
│ ├── system_prompt.md # AI personality
│ ├── memories.json # Persistent memory
│ └── sessions.json # Chat sessions
├── docs/
│ ├── README.md # User documentation
│ └── README_TECHNICAL.md # API reference
└── models/ # AI models (auto-downloaded)
├── llama3/ # Text models (GGUF)
├── mistral/
├── phi3/
└── image/ # Image models (Diffusers)
Adding Models
Text Models (GGUF format)
Place .gguf files in models/ folder:
models/
├── llama3/Llama-3.2-3B-Instruct-Q4_K_M.gguf
├── mistral/Mistral-7B-Instruct-v0.3.Q4_K_M.gguf
└── phi3/Phi-3-mini-4k-instruct-q4.gguf
Image Models (Diffusers format)
Place model folders in models/image/:
models/image/
├── dreamshaper-8/
├── realistic-vision-v51/
└── epicrealism/
API Reference
See docs/README_TECHNICAL.md for full API documentation.
Quick API Examples
Chat:
POST /api/chat
{"message": "Hello", "session_id": "uuid"}
List Models:
GET /api/models
GET /api/image/models
Generate Image:
POST /api/image/generate
{"prompt": "a cat in space", "width": 512, "height": 512}
Contact
- Website: www.unityailab.com
- Email: unityailabcontact@gmail.com
- Creators: Hackall360, Sponge, GFourteen
License
Private project by Unity AI Lab.