Skip to content

Commit 567dec5

Browse files
authored
✨ Version number display #1231
2 parents 88db932 + e63cc52 commit 567dec5

File tree

11 files changed

+947
-239
lines changed

11 files changed

+947
-239
lines changed

backend/apps/tenant_config_app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from fastapi import APIRouter, Body, Header, HTTPException
66
from fastapi.responses import JSONResponse
77

8-
from consts.const import DEPLOYMENT_VERSION
8+
from consts.const import DEPLOYMENT_VERSION, APP_VERSION
99
from services.tenant_config_service import get_selected_knowledge_list, update_selected_knowledge
1010
from utils.auth_utils import get_current_user_id
1111

@@ -22,6 +22,7 @@ def get_deployment_version():
2222
return JSONResponse(
2323
status_code=HTTPStatus.OK,
2424
content={"deployment_version": DEPLOYMENT_VERSION,
25+
"app_version": APP_VERSION,
2526
"status": "success"}
2627
)
2728
except Exception as e:

backend/consts/const.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,6 @@
258258
os.getenv("LLM_SLOW_REQUEST_THRESHOLD_SECONDS", "5.0"))
259259
LLM_SLOW_TOKEN_RATE_THRESHOLD = float(
260260
os.getenv("LLM_SLOW_TOKEN_RATE_THRESHOLD", "10.0")) # tokens per second
261+
262+
# APP Version
263+
APP_VERSION = "v1.7.4"

backend/main_service.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import logging
33
import warnings
44
import asyncio
5+
6+
from consts.const import APP_VERSION
7+
58
warnings.filterwarnings("ignore", category=UserWarning)
69

710
from dotenv import load_dotenv
@@ -11,7 +14,6 @@
1114
from utils.logging_utils import configure_logging, configure_elasticsearch_logging
1215
from services.tool_configuration_service import initialize_tools_on_startup
1316

14-
1517
configure_logging(logging.INFO)
1618
configure_elasticsearch_logging()
1719
logger = logging.getLogger("main_service")
@@ -22,7 +24,7 @@ async def startup_initialization():
2224
Perform initialization tasks during server startup
2325
"""
2426
logger.info("Starting server initialization...")
25-
27+
logger.info(f"APP version is: {APP_VERSION}")
2628
try:
2729
# Initialize tools on startup - service layer handles detailed logging
2830
await initialize_tools_on_startup()

0 commit comments

Comments
 (0)