3d330655a6
Python 3.11 + FastAPI con tre endpoint (/health, /auth/test, /recipes/generate). Autenticazione via header X-App-Password, validazione input Pydantic, chiamata in streaming a NVIDIA NIM (nemotron-3-ultra-550b-a55b) con thinking. Dockerizzato con docker-compose; configurazione tramite .env. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
19 lines
491 B
Python
19 lines
491 B
Python
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
nvidia_api_key: str
|
|
app_password: str
|
|
nvidia_base_url: str = "https://integrate.api.nvidia.com/v1"
|
|
nvidia_model: str = "nvidia/nemotron-3-ultra-550b-a55b"
|
|
nvidia_timeout_seconds: int = 120
|
|
nvidia_max_tokens: int = 16384
|
|
nvidia_temperature: float = 1.0
|
|
nvidia_top_p: float = 0.95
|
|
nvidia_reasoning_budget: int = 2048
|
|
|
|
model_config = {"env_file": ".env"}
|
|
|
|
|
|
settings = Settings()
|