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.

chore: fix backend error fix (#4428)

Shubham Naik83a4815fa836
diff --git a/letta/server/rest_api/routers/v1/internal_templates.py b/letta/server/rest_api/routers/v1/internal_templates.py
index 99e8ed861..4a16162cf 100644
--- a/letta/server/rest_api/routers/v1/internal_templates.py
+++ b/letta/server/rest_api/routers/v1/internal_templates.py
@@ -55,7 +55,8 @@ async def create_block(
"""
try:
actor = await server.user_manager.get_actor_or_default_async(actor_id=actor_id)
- return await server.block_manager.create_or_update_block_async(block, actor=actor)
+ block_obj = Block(**block.model_dump())
+ return await server.block_manager.create_or_update_block_async(block_obj, actor=actor)
except Exception as e:
raise HTTPException(status_code=500, detail=str(e))