""" config/settings.py — all constants in one place. Change values here; nothing else needs editing. """ # ── API ─────────────────────────────────────────────────────────────────────── API_BASE_URL = "https://api.modelbest.cn/v1" # Free public key provided by OpenBMB — rate-limited, no signup. # Set env var MINICPM_API_KEY to override at runtime without touching code. PUBLIC_API_KEY = "sk-pQ8L2zF3XmR5kY9wV4jB7hN1tC6vM0xG3aD5sH2bJ9lK4cZ8" # ── Models ──────────────────────────────────────────────────────────────────── # Both are 1.3 B parameters — well under the 32 B cap. MODELS: dict[str, str] = { "⚡ Instruct (fast, direct)": "MiniCPM-V-4.6-Instruct", "🧠 Thinking (reasons first)": "MiniCPM-V-4.6-Thinking", } MODEL_PARAMS: dict[str, str] = { "MiniCPM-V-4.6-Instruct": "1.3 B", "MiniCPM-V-4.6-Thinking": "1.3 B", } # ── Generation defaults ─────────────────────────────────────────────────────── DEFAULT_PROMPT = "Describe this image in detail." DEFAULT_MAX_TOKENS = 512 DEFAULT_TEMPERATURE = 0.7 # ── Image encoding ──────────────────────────────────────────────────────────── IMAGE_QUALITY = 90 # JPEG quality sent to the API (0-100)