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: Fix circular commit (#6029)

Matthew Zhou790e1655e256
diff --git a/letta/schemas/passage.py b/letta/schemas/passage.py
index 00506cc4b..36cd23c13 100644
--- a/letta/schemas/passage.py
+++ b/letta/schemas/passage.py
@@ -6,7 +6,6 @@ from pydantic import Field, field_validator
from letta import settings
from letta.constants import MAX_EMBEDDING_DIM
from letta.helpers.datetime_helpers import get_utc_time
-from letta.helpers.tpuf_client import should_use_tpuf
from letta.schemas.embedding_config import EmbeddingConfig
from letta.schemas.enums import PrimitiveType
from letta.schemas.letta_base import OrmMetadataBase
@@ -62,6 +61,8 @@ class Passage(PassageBase):
def pad_embeddings(cls, embedding: List[float]) -> List[float]:
"""Pad embeddings to `MAX_EMBEDDING_SIZE`. This is necessary to ensure all stored embeddings are the same size."""
# Only do this if using pgvector
+ from letta.helpers.tpuf_client import should_use_tpuf
+
if should_use_tpuf() and settings.environment == "PRODUCTION":
import numpy as np