Views
No views yet
Bu commit Step 1 — Temel İskelet'tir. Sadece Google Vertex AI canlı, diğer tüm modüller stub. TCMB, Nominatim, OpenRouteService, NewsAPI, World Bank vb. dış API'ler bu adımda yoktur.
backend/.env dosyasına kopyala:
project_id → VERTEX_PROJECT_IDclient_email → VERTEX_CLIENT_EMAILprivate_key → VERTEX_PRIVATE_KEY (tek satır; gerçek satır sonları yerine \n kalır)VERTEX_PROJECT_ID_2, VERTEX_CLIENT_EMAIL_2, VERTEX_PRIVATE_KEY_2 doldurulabilir..env yeterli, gitignore'lı.| Model | Görev | Endpoint |
|---|---|---|
gemini-3.1-pro-preview | Text + Vision reasoning (1M token context) | global |
gemini-3-pro-image-preview | Nano Banana Pro — ambalaj redesign | global |
gemini-2.5-flash-image-preview | Nano Banana — fallback / hızlı batch | global |
text-multilingual-embedding-002 | RAG embedding (TR + AR + JP + EN) | us-central1 |
global endpoint'te çalışır (us-central1 404 döner). Kod region routing'i otomatik yapar — gerek yok elle ayarlamana.google-genai (yeni), embedding için vertexai (eski). İkisi de pip install -r requirements.txt ile gelir.1# 1. Backend env
2cp backend/.env.example backend/.env
3# backend/.env içine Vertex SA 3 alanını doldur (yukarıdaki Vertex AI Setup adımları).
4
5# 2. Backend
6cd backend
7python -m venv .venv
8source .venv/bin/activate # Windows: .venv\Scripts\activate
9pip install -r requirements.txt
10uvicorn main:app --reload --port 8000
11
12# 3. Frontend (yeni terminal)
13cd frontend
14cp .env.local.example .env.local
15npm install
16npm run dev1curl http://localhost:8000/health
2curl http://localhost:8000/vertex/test-text
3curl http://localhost:8000/vertex/test-vision
4curl http://localhost:8000/vertex/test-embedding
5curl http://localhost:8000/vertex/test-image-gen/vertex/test-image-gen ilk çağrıda Nano Banana Pro'yu dener; hata alırsa otomatik olarak Nano Banana 2 fallback'ine geçer ve cevapta fallback_attempted: true döner.cave2cloud/
├── backend/ FastAPI + Vertex AI
│ ├── main.py
│ ├── config.py
│ ├── vertex/ Vertex AI istemcileri
│ ├── routes/ API endpoint'leri (çoğu stub)
│ ├── ml/ LightGBM inference (dummy)
│ ├── rag/ ChromaDB iskelet
│ └── data/ PDF, ChromaDB, cultural rules
└── frontend/ Next.js 14 + Tailwind + shadcn/ui
├── app/ App Router sayfaları
├── components/ UI bileşenleri
└── lib/ API wrapper, utils