| """ | |
| 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) | |