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.

bump version and sqlite fixes

Sarah Wooders814b9e6a4a9a
diff --git a/Dockerfile b/Dockerfile
index fc3f3a4c3..e0c70a97b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -61,6 +61,9 @@ RUN apt-get update && \
COPY otel/otel-collector-config-file.yaml /etc/otel/config-file.yaml
COPY otel/otel-collector-config-clickhouse.yaml /etc/otel/config-clickhouse.yaml
+# set experimental flag
+ARG LETTA_USE_EXPERIMENTAL=1
+
ARG LETTA_ENVIRONMENT=PRODUCTION
ENV LETTA_ENVIRONMENT=${LETTA_ENVIRONMENT} \
VIRTUAL_ENV="/app/.venv" \
diff --git a/letta/__init__.py b/letta/__init__.py
index 55b12c31b..a662834ec 100644
--- a/letta/__init__.py
+++ b/letta/__init__.py
@@ -1,6 +1,6 @@
import os
-__version__ = "0.8.0"
+__version__ = "0.8.1"
if os.environ.get("LETTA_VERSION"):
__version__ = os.environ["LETTA_VERSION"]
diff --git a/letta/orm/sqlalchemy_base.py b/letta/orm/sqlalchemy_base.py
index 04e27e11b..bad6800a0 100644
--- a/letta/orm/sqlalchemy_base.py
+++ b/letta/orm/sqlalchemy_base.py
@@ -472,14 +472,18 @@ class SqlalchemyBase(CommonSqlalchemyMetaMixins, Base):
Raises:
NoResultFound: if the object is not found
"""
+ from letta.settings import settings
identifiers = [] if identifier is None else [identifier]
query, query_conditions = cls._read_multiple_preprocess(identifiers, actor, access, access_type, check_is_deleted, **kwargs)
- await db_session.execute(text("SET LOCAL enable_seqscan = OFF"))
+
+ if settings.letta_pg_uri_no_default:
+ await db_session.execute(text("SET LOCAL enable_seqscan = OFF"))
try:
result = await db_session.execute(query)
item = result.scalar_one_or_none()
finally:
- await db_session.execute(text("SET LOCAL enable_seqscan = ON"))
+ if settings.letta_pg_uri_no_default:
+ await db_session.execute(text("SET LOCAL enable_seqscan = ON"))
if item is None:
raise NoResultFound(f"{cls.__name__} not found with {', '.join(query_conditions if query_conditions else ['no conditions'])}")
diff --git a/letta/services/user_manager.py b/letta/services/user_manager.py
index c48006ec5..689704121 100644
--- a/letta/services/user_manager.py
+++ b/letta/services/user_manager.py
@@ -11,6 +11,7 @@ from letta.server.db import db_registry
from letta.services.organization_manager import OrganizationManager
from letta.tracing import trace_method
from letta.utils import enforce_types
+from letta.settings import settings
class UserManager:
@@ -147,13 +148,15 @@ class UserManager:
"""Fetch a user by ID asynchronously."""
async with db_registry.async_session() as session:
# Turn off seqscan to force use pk index
- await session.execute(text("SET LOCAL enable_seqscan = OFF"))
+ if settings.letta_pg_uri_no_default:
+ await session.execute(text("SET LOCAL enable_seqscan = OFF"))
try:
stmt = select(UserModel).where(UserModel.id == actor_id)
result = await session.execute(stmt)
user = result.scalar_one_or_none()
finally:
- await session.execute(text("SET LOCAL enable_seqscan = ON"))
+ if settings.letta_pg_uri_no_default:
+ await session.execute(text("SET LOCAL enable_seqscan = ON"))
if not user:
raise NoResultFound(f"User not found with id={actor_id}")
diff --git a/pyproject.toml b/pyproject.toml
index 19543bb42..ae42a6421 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "letta"
-version = "0.8.0"
+version = "0.8.1"
packages = [
{include = "letta"},
]