Skip to content

Commit 1499ce5

Browse files
authored
feat: print version during startup (#275)
* feat: print version during startup * feat: print version during startup
1 parent 8564135 commit 1499ce5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

hindsight-api/hindsight_api/banner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,12 @@ def print_startup_info(
8383
embeddings_provider: str,
8484
reranker_provider: str,
8585
mcp_enabled: bool = False,
86+
version: str | None = None,
8687
):
8788
"""Print styled startup information."""
8889
print(color_start("Starting Hindsight API..."))
90+
if version:
91+
print(f" {dim('Version:')} {color(f'v{version}', 0.1)}")
8992
print(f" {dim('URL:')} {color(f'http://{host}:{port}', 0.2)}")
9093
print(f" {dim('Database:')} {color(database_url, 0.4)}")
9194
print(f" {dim('LLM:')} {color(f'{llm_provider} / {llm_model}', 0.6)}")

hindsight-api/hindsight_api/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import uvicorn
2222

23-
from . import MemoryEngine
23+
from . import MemoryEngine, __version__
2424
from .api import create_app
2525
from .banner import print_banner
2626
from .config import DEFAULT_WORKERS, ENV_WORKERS, HindsightConfig, get_config
@@ -362,6 +362,7 @@ def release_lock():
362362
embeddings_provider=config.embeddings_provider,
363363
reranker_provider=config.reranker_provider,
364364
mcp_enabled=config.mcp_enabled,
365+
version=__version__,
365366
)
366367

367368
# Start idle checker in daemon mode

0 commit comments

Comments
 (0)