Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
chore: track letta version in tracing and nightly versions (#2491)
Andy Lif2b9ec64e02e
diff --git a/.github/workflows/docker-image-nightly.yml b/.github/workflows/docker-image-nightly.ymlindex aff0b514c..b6ea6263c 100644--- a/.github/workflows/docker-image-nightly.yml+++ b/.github/workflows/docker-image-nightly.yml@@ -23,5 +23,8 @@ jobs:- uses: actions/checkout@v3- name: Build and push the Docker image (letta)run: |- docker build . --file Dockerfile --tag letta/letta:nightly+ docker build . \+ --file Dockerfile \+ --tag letta/letta:nightly \+ --build-arg LETTA_VERSION="nightly-$(date +%Y%m%d)-$(git rev-parse --short HEAD)"docker push letta/letta:nightlydiff --git a/Dockerfile b/Dockerfileindex 0e76854ce..fc3f3a4c3 100644--- a/Dockerfile+++ b/Dockerfile@@ -70,6 +70,9 @@ ENV LETTA_ENVIRONMENT=${LETTA_ENVIRONMENT} \POSTGRES_DB=letta \COMPOSIO_DISABLE_VERSION_CHECK=true+# Set for other builds+ARG LETTA_VERSION+ENV LETTA_VERSION=${LETTA_VERSION}WORKDIR /appdiff --git a/letta/__init__.py b/letta/__init__.pyindex e462b907b..1d620eb76 100644--- a/letta/__init__.py+++ b/letta/__init__.py@@ -1,5 +1,11 @@+import os+__version__ = "0.7.14"+if os.environ.get("LETTA_VERSION"):+ __version__ = os.environ["LETTA_VERSION"]++# import clientsfrom letta.client.client import RESTClientdiff --git a/letta/tracing.py b/letta/tracing.pyindex d54963e3b..de3e4c5eb 100644--- a/letta/tracing.py+++ b/letta/tracing.py@@ -16,6 +16,8 @@ from opentelemetry.sdk.trace import TracerProviderfrom opentelemetry.sdk.trace.export import BatchSpanProcessorfrom opentelemetry.trace import Status, StatusCode+from letta import __version__ as letta_version+tracer = trace.get_tracer(__name__)_is_tracing_initialized = False_excluded_v1_endpoints_regex: List[str] = [@@ -24,6 +26,7 @@ _excluded_v1_endpoints_regex: List[str] = [# "^GET /v1/agents/(?P<agent_id>[^/]+)/archival-memory$",# "^GET /v1/agents/(?P<agent_id>[^/]+)/sources$",# r"^POST /v1/voice-beta/.*/chat/completions$",+ "^GET /v1/health$",]@@ -149,7 +152,8 @@ def setup_tracing(resource=Resource.create({"service.name": service_name,- "device.id": uuid.getnode(), # MAC address as unique device identifier+ "device.id": uuid.getnode(), # MAC address as unique device identifier,+ "letta.version": letta_version,}))