Update README dengan step instalasi lengkap

This commit is contained in:
2026-05-27 00:58:02 +00:00
parent 2466db43b3
commit 2c055abe29
+71 -13
View File
@@ -1,28 +1,86 @@
# LiteLLM Config # LiteLLM Config — Alcozaky Cookies
Konfigurasi LiteLLM proxy Alcozaky Cookies. Konfigurasi LiteLLM proxy untuk Hermes Agent & AI tools.
## Struktur ## Struktur
``` ```
├── docker-compose.yml ← Cara jalanin LiteLLM + DB + Redis ├── docker-compose.yml ← Cara jalanin LiteLLM + DB + Redis
├── config.yaml ← Daftar model AI & load balancing ├── config.yaml ← Daftar model AI & load balancing
├── .env.example ← Template API key (isi sendiri di .env) ├── .env.example ← Template API key (isi sendiri)
├── .gitignore ├── .gitignore
├── scripts/ ← Helper Python (add/remove key, proxy) ├── scripts/ ← Helper Python (add/remove key, proxy, etc)
└── README.md └── README.md
``` ```
## Cara Pake ## Instalasi dari Awal
1. Copy `.env.example` ke `.env`, isi API key masing-masing ### 1. Clone repo di server tujuan
2. `docker compose up -d`
3. Proxy available di `http://localhost:4000` ```bash
git clone http://192.168.1.77:3000/sakhiy/litellm-config.git /opt/litellm
cd /opt/litellm
```
### 2. Buat file .env
```bash
cp .env.example .env
nano .env # ← isi semua API key & password
```
### 3. Jalanin Docker Compose
```bash
docker compose up -d
```
Cek status:
```bash
docker compose ps
docker compose logs -f litellm
```
### 4. Test proxy
```bash
curl http://localhost:4000/health
# Test pake model
curl http://localhost:4000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $(grep LITELLM_MASTER_KEY .env | cut -d= -f2)" \
-d '{
"model": "hermes-engine",
"messages": [{"role": "user", "content": "halo"}]
}'
```
## Model Tiers ## Model Tiers
| Tier | Model | Provider | Akun | | Tier | Model Name | Provider | Akun | Fungsi |
|------|-------|----------|------| |------|-----------|----------|------|--------|
| 1 | `hermes-engine` | Gemini 2.5 Flash | 5 (load balanced) | | 1 | `hermes-engine` | Gemini 2.5 Flash | 5 | Main — load balanced otomatis |
| 2 | `tier2-fallback` | GPT-4o Mini (GitHub) | 2 | | 2 | `tier2-fallback` | GPT-4o Mini (GitHub) | 2 | Cadangan kalo Gemini error semua |
| 3 | `tier3-emergency` | Llama 3 70B (Groq) | 2 | | 3 | `tier3-emergency` | Llama 3 70B (Groq) | 2 | Darurat kalo semua tier error |
## Port
| Service | Port |
|---------|------|
| LiteLLM proxy | 4000 |
| PostgreSQL | 5432 (internal) |
| Redis | 6379 (internal) |
## Scripts
| Script | Fungsi |
|--------|--------|
| `scripts/proxy.py` | AI proxy utama (alternative ke LiteLLM) |
| `scripts/add-keys.py` | Nambah API key ke proxy |
| `scripts/copy-keys.py` | Copy key antar config |
| `scripts/extract-keys.py` | Extract key dari env |
| `scripts/add-groq3.py` | Nambah Groq akun ke-3 |
| `scripts/rm-gemini.py` | Hapus Gemini key tertentu |
| `scripts/setup-github.py` | Setup GitHub token ke proxy |
| `scripts/test.py` | Test koneksi proxy |