From cea438bee6bc9890cf7a413154570c85b172bafe Mon Sep 17 00:00:00 2001 From: Dillon Laird Date: Fri, 23 Aug 2024 18:20:55 -0700 Subject: [PATCH] fixed json decode error --- vision_agent/agent/agent_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/vision_agent/agent/agent_utils.py b/vision_agent/agent/agent_utils.py index 6e08ad88..5d55e963 100644 --- a/vision_agent/agent/agent_utils.py +++ b/vision_agent/agent/agent_utils.py @@ -8,6 +8,7 @@ def extract_json(json_str: str) -> Dict[str, Any]: try: + json_str = json_str.replace("\n", " ") json_dict = json.loads(json_str) except json.JSONDecodeError: if "```json" in json_str: