FastAPI + Google Gemini + PHP/MySQL
Hasar sorgu, kasko & trafik teklifi; müşteri tanıma ve canlı chat kutusu ile tam entegre demo.
Minimal, açık temalı kurumsal demo site + sağ altta chat baloncuğu
- Niyet Algılama & Yönlendirme:
general → hasar_sorgula / kasko_teklif / trafik_teklif / off_topic - Müşteri Tanıma: TCKN ile
hasar_detaysorgusu (PHP API + MySQL JOIN) - Swagger Dokümantasyon: FastAPI (
/swagger) + PHP API (swagger.html) - Configurable:
.envileGEMINI_API_KEY,API_BASE, CORS, model adı…
FastAPI (Python)
├─ /chat ← Gemini yönlendirme + payload doğrulama
│ ├─ PHP API'ye GET → hasar_detay (TCKN)
│ ├─ MySQL (sigorta_chatbot)
│ └─ /swagger (OpenAPI UI)
PHP API (api.php)
├─ /api.php?table=musteri
├─ /api.php?table=hasar_dosya
└─ /api.php?table=hasar_detay&tckn=... ← JOIN + son kayıt
Static Frontend
└─ app/static/index.html ← Demo sitesi# repo kökünde
pip install -r requirements.txt
# .env örneğini çoğalt, anahtarı gir
cp .env.example .env
# dev sunucu
python -m uvicorn app.main:app --host 0.0.0.0 --port 8000
# http://localhost:8000/swagger