fix(perceptual): prevent errors when writing unsupported modalities

This commit is contained in:
Eternity
2026-03-24 14:30:07 +08:00
parent 89d188fbf3
commit de6e2f54d2
3 changed files with 6 additions and 6 deletions

View File

@@ -131,7 +131,6 @@ class MemoryAPIService:
message: str,
config_id: str,
storage_type: str = "neo4j",
files: Optional[list]=None,
user_rag_memory_id: Optional[str] = None,
) -> Dict[str, Any]:
"""Write memory with validation.
@@ -154,8 +153,6 @@ class MemoryAPIService:
ResourceNotFoundException: If end_user not found
BusinessException: If end_user not in authorized workspace or write fails
"""
if files is None:
files = list()
logger.info(f"Writing memory for end_user: {end_user_id}, workspace: {workspace_id}")
# Validate end_user exists and belongs to workspace
@@ -175,7 +172,6 @@ class MemoryAPIService:
db=self.db,
storage_type=storage_type,
user_rag_memory_id=user_rag_memory_id or "",
files=files
)
logger.info(f"Memory write successful for end_user: {end_user_id}")