Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: sanitize null bytes test (#8135)
jnjpng700409d943fc
diff --git a/letta/helpers/json_helpers.py b/letta/helpers/json_helpers.pyindex aba17d05d..27f8b7359 100644--- a/letta/helpers/json_helpers.py+++ b/letta/helpers/json_helpers.py@@ -26,8 +26,8 @@ def sanitize_null_bytes(value: Any) -> Any:# Remove null bytes from stringsreturn value.replace("\x00", "")elif isinstance(value, dict):- # Recursively sanitize dictionary values- return {k: sanitize_null_bytes(v) for k, v in value.items()}+ # Recursively sanitize dictionary keys and values+ return {sanitize_null_bytes(k): sanitize_null_bytes(v) for k, v in value.items()}elif isinstance(value, list):# Recursively sanitize list elementsreturn [sanitize_null_bytes(item) for item in value]