Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

Fix a bug where letta version is not printed

Tevin Zhang36ef6a2f6815
diff --git a/letta/cli/cli.py b/letta/cli/cli.py
index a969de017..6dd4e6094 100644
--- a/letta/cli/cli.py
+++ b/letta/cli/cli.py
@@ -361,4 +361,4 @@ def delete_agent(
def version() -> str:
import letta
- return letta.__version__
+ print(letta.__version__)
diff --git a/letta/server/rest_api/routers/v1/health.py b/letta/server/rest_api/routers/v1/health.py
index 99fce66d4..3b4335699 100644
--- a/letta/server/rest_api/routers/v1/health.py
+++ b/letta/server/rest_api/routers/v1/health.py
@@ -2,7 +2,7 @@ from typing import TYPE_CHECKING
from fastapi import APIRouter
-from letta.cli.cli import version
+from letta import __version__
from letta.schemas.health import Health
if TYPE_CHECKING:
@@ -15,6 +15,6 @@ router = APIRouter(prefix="/health", tags=["health"])
@router.get("/", response_model=Health, operation_id="health_check")
def health_check():
return Health(
- version=version(),
+ version=__version__,
status="ok",
)