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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user