From e4a337f1a5d6210a7417899f1844a685908eaf58 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 7 Jul 2023 08:00:58 +0800 Subject: [PATCH] Fix potential passing of NoneType to remove_ansi_escape (#4882) Co-authored-by: Reinier van der Leer Co-authored-by: Luke <2609441+lc0rp@users.noreply.github.com> --- autogpt/logs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogpt/logs.py b/autogpt/logs.py index 329afb8b..9d99f274 100644 --- a/autogpt/logs.py +++ b/autogpt/logs.py @@ -271,7 +271,7 @@ def print_assistant_thoughts( assistant_thoughts_criticism = None assistant_thoughts = assistant_reply_json_valid.get("thoughts", {}) - assistant_thoughts_text = remove_ansi_escape(assistant_thoughts.get("text")) + assistant_thoughts_text = remove_ansi_escape(assistant_thoughts.get("text", "")) if assistant_thoughts: assistant_thoughts_reasoning = remove_ansi_escape( assistant_thoughts.get("reasoning")