# app/config.py
from pathlib import Path
import os

# ---- GCP SETTINGS ----
GCP_PROJECT_ID = "turing-agent-358210"
GCS_BUCKET_NAME = "capstone-ii-applicant-documents"

# Prefix where the *PDFs* live
PDF_INPUT_PREFIX = "applicant-documents-pdf/"

# Prefix where raw Vision OCR JSON is written
VISION_OUTPUT_PREFIX = "vision-ocr-results/"

# Prefix where your per-applicant combined OCR JSON lives (if you create them)
OCR_RESULTS_PREFIX = "ocr-results-json/"

# Prefix where KPI extraction CSVs / JSONs are stored, if you persist them
KPI_RESULTS_PREFIX = "extracted-data/"

VALIDATION_RESULTS_PREFIX = "validation-results/"

RISK_RESULTS_PREFIX = "applicant-default-risk/"


# ---- MODEL PATH ----
BASE_DIR = Path(__file__).resolve().parent.parent
MODELS_DIR = BASE_DIR / "models"

# Choose which trained model you want to serve from loan_risk_model.ipynb
MODEL_PATH = MODELS_DIR / "best_random_forest.joblib"  # or best_random_forest, best_logistic_regression, etc.

# ---- Vertex AI / Gemini ----
GCP_REGION = "us-central1"
VERTEX_MODEL_NAME = "gemini-2.5-flash"  # must exist and be accessible in your project/region

# Service account JSON (for local dev; in production use env / workload identity)
SERVICE_ACCOUNT_JSON = Path("../../turing-agent-358210-44bf93602660.json")
if SERVICE_ACCOUNT_JSON.exists():
    os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = str(SERVICE_ACCOUNT_JSON.resolve())
