Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: minor patches for sources (#2410)
Sarah Wooders852e9ee7f299
diff --git a/letta/services/block_manager.py b/letta/services/block_manager.pyindex 571170fbb..8584bb15e 100644--- a/letta/services/block_manager.py+++ b/letta/services/block_manager.py@@ -77,7 +77,7 @@ class BlockManager:# Convert back to Pydanticreturn [m.to_pydantic() for m in created_models]- @trace_method+ @trace_method@enforce_typesasync def batch_create_blocks_async(self, blocks: List[PydanticBlock], actor: PydanticUser) -> List[PydanticBlock]:"""diff --git a/letta/services/source_manager.py b/letta/services/source_manager.pyindex 7ec7aa3c1..d3137bc51 100644--- a/letta/services/source_manager.py+++ b/letta/services/source_manager.py@@ -48,7 +48,7 @@ class SourceManager:if update_data:for key, value in update_data.items():setattr(source, key, value)- source.update(db_session=session, actor=actor)+ await source.update_async(db_session=session, actor=actor)else:printd(f"`update_source` was called with user_id={actor.id}, organization_id={actor.organization_id}, name={source.name}, but found existing source with nothing to update."diff --git a/tests/test_managers.py b/tests/test_managers.pyindex 40e387e64..0816878bf 100644--- a/tests/test_managers.py+++ b/tests/test_managers.py@@ -548,7 +548,7 @@ async def agent_passages_setup(server, default_source, default_user, sarah_agentyield agent_passages, source_passages# Cleanup- server.source_manager.delete_source(default_source.id, actor=actor)+ await server.source_manager.delete_source(default_source.id, actor=actor)@pytest.fixture