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.

feat: expunge orm objects for garbage collection (#6270)

cthomasd0d47021e53a
diff --git a/letta/server/db.py b/letta/server/db.py
index f5b44479e..89677ff8c 100644
--- a/letta/server/db.py
+++ b/letta/server/db.py
@@ -72,6 +72,7 @@ class DatabaseRegistry:
await session.rollback()
raise
finally:
+ session.expunge_all()
await session.close()