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.

fix: syntax warning on startup

Zack Field9cc827ff90b0
diff --git a/memgpt/local_llm/json_parser.py b/memgpt/local_llm/json_parser.py
index 0c8bbe033..13849201f 100644
--- a/memgpt/local_llm/json_parser.py
+++ b/memgpt/local_llm/json_parser.py
@@ -18,7 +18,7 @@ def clean_json_string_extra_backslash(s):
def replace_escaped_underscores(string: str):
- """Handles the case of escaped underscores, e.g.:
+ r"""Handles the case of escaped underscores, e.g.:
{
"function":"send\_message",
@@ -26,7 +26,7 @@ def replace_escaped_underscores(string: str):
"inner\_thoughts": "User is asking for information about themselves. Retrieving data from core memory.",
"message": "I know that you are Chad. Is there something specific you would like to know or talk about regarding yourself?"
"""
- return string.replace("\_", "_")
+ return string.replace(r"\_", "_")
def extract_first_json(string: str):