refactor: фаза 5 — чистка (APP_VERSION, LLM константы)

- constants.py: APP_VERSION, LLM_DEFAULT_TEMPERATURE, LLM_RESPONSE_FORMAT
- main.py: версия из APP_VERSION (вместо хардкод '0.1.0'×2)
- llm.py: temperature и response_format из constants

Всего: 85 тестов, ruff clean
This commit is contained in:
Marker689
2026-05-10 07:59:57 +03:00
parent f252c256d8
commit 904e917f1f
3 changed files with 15 additions and 6 deletions

View File

@@ -9,7 +9,13 @@ from fastapi.staticfiles import StaticFiles
from starlette.middleware.base import BaseHTTPMiddleware
from guarddog_nexus.config import config
from guarddog_nexus.constants import APP_DESCRIPTION, APP_NAME, APP_PACKAGE, STATIC_MOUNT_PATH
from guarddog_nexus.constants import (
APP_DESCRIPTION,
APP_NAME,
APP_PACKAGE,
APP_VERSION,
STATIC_MOUNT_PATH,
)
from guarddog_nexus.db.engine import init_db
from guarddog_nexus.i18n import DEFAULT_LANG, LANGUAGES
from guarddog_nexus.logging_setup import log
@@ -52,7 +58,7 @@ async def lifespan(app: FastAPI):
app = FastAPI(
title=APP_NAME,
version="0.1.0",
version=APP_VERSION,
description=APP_DESCRIPTION,
lifespan=lifespan,
)
@@ -71,7 +77,7 @@ if os.path.isdir(STATIC_DIR):
@app.get("/health")
async def health():
return {"status": "ok", "version": "0.1.0"}
return {"status": "ok", "version": APP_VERSION}
def main():