Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: don't expire on commit (#3384)
cthomasce2fdf36696f
diff --git a/letta/orm/message.py b/letta/orm/message.pyindex 41551fb5c..89d6cc15a 100644--- a/letta/orm/message.py+++ b/letta/orm/message.py@@ -78,7 +78,7 @@ class Message(SqlalchemyBase, OrganizationMixin, AgentMixin):if self.text and not model.content:model.content = [PydanticTextContent(text=self.text)]# If there are no tool calls, set tool_calls to None- if len(self.tool_calls) == 0:+ if self.tool_calls is None or len(self.tool_calls) == 0:model.tool_calls = Nonereturn modeldiff --git a/letta/server/db.py b/letta/server/db.pyindex 4d103a962..a6ffcd4fe 100644--- a/letta/server/db.py+++ b/letta/server/db.py@@ -136,7 +136,7 @@ class DatabaseRegistry:self._setup_pool_monitoring(async_engine, "default_async")self._async_session_factories["default"] = async_sessionmaker(- expire_on_commit=True,+ expire_on_commit=False,close_resets_only=False,autocommit=False,autoflush=False,