From a367ee4072afa53e22d53559fa4aed22174245ca Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Wed, 29 Nov 2023 12:57:05 -0800 Subject: [PATCH] patched a bug where outputs of a regex extraction weren't getting cast back to string, causing an issue when the dict was then passed to json.dumps() (#533) --- memgpt/local_llm/json_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/memgpt/local_llm/json_parser.py b/memgpt/local_llm/json_parser.py index 5e0336cd..1eab64c4 100644 --- a/memgpt/local_llm/json_parser.py +++ b/memgpt/local_llm/json_parser.py @@ -62,8 +62,8 @@ def clean_and_interpret_send_message_json(json_string): return { "function": "send_message", "params": { - "inner_thoughts": inner_thoughts_match, - "message": message_match, + "inner_thoughts": inner_thoughts_match.group(1), + "message": message_match.group(1), }, } else: