Download app/config.py from umairali64488/multi_llm_debugging_engine: direct link, hf CLI and curl.
- Browser
- Download file 2.12 kB
-
https://huggingface.co/spaces/umairali64488/multi_llm_debugging_engine/resolve/main/app/config.py
- Command line
-
hf download hf://spaces/umairali64488/multi_llm_debugging_engine/app/config.py
-
curl -L -o config.py https://huggingface.co/spaces/umairali64488/multi_llm_debugging_engine/resolve/main/app/config.py
2.12 kB
| """ | |
| config.py — Application settings via pydantic-settings. | |
| Set OPENROUTER_API_KEY in .env locally or in HF Space Secrets. | |
| """ | |
| import os | |
| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| class Settings(BaseSettings): | |
| model_config = SettingsConfigDict( | |
| env_file=".env", | |
| env_file_encoding="utf-8", | |
| extra="ignore", | |
| case_sensitive=False, | |
| ) | |
| # ── OpenRouter ───────────────────────────────────────────────────────────── | |
| OPENROUTER_API_KEY: str = "" | |
| BASE_URL: str = "https://openrouter.ai/api/v1" | |
| # ── 2 Panel Debugger LLMs (run in parallel) ──────────────────────────────── | |
| PANEL_MODELS: list = [ | |
| "arcee-ai/trinity-large-preview:free", | |
| "nvidia/nemotron-3-nano-30b-a3b:free", | |
| ] | |
| PANEL_MODEL_LABELS: dict = { | |
| "arcee-ai/trinity-large-preview:free": "Trinity Large", | |
| "nvidia/nemotron-3-nano-30b-a3b:free": "Nemotron Nano", | |
| } | |
| # ── Judge LLM (StepFun Flash) ───────────────────────────────────────────── | |
| JUDGE_MODEL: str = "stepfun/step-3.5-flash:free" | |
| JUDGE_LABEL: str = "StepFun Flash Judge" | |
| # ── Generation params ───────────────────────────────────────────────────── | |
| PANEL_TEMPERATURE: float = 0.3 | |
| JUDGE_TEMPERATURE: float = 0.1 | |
| PANEL_MAX_TOKENS: int = 2048 | |
| JUDGE_MAX_TOKENS: int = 4096 | |
| def __init__(self, **data): | |
| if not data.get("OPENROUTER_API_KEY"): | |
| env_key = ( | |
| os.environ.get("OPENROUTER_API_KEY") | |
| or os.environ.get("openrouter_api_key") | |
| or "" | |
| ) | |
| if env_key: | |
| data["OPENROUTER_API_KEY"] = env_key | |
| super().__init__(**data) | |
| settings = Settings() | |