AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Ensures custom print function handles empty content.
Torantulinobd9d532b735b
diff --git a/AutonomousAI/main.py b/AutonomousAI/main.pyindex f20a6ce456..60a5f4a3bb 100644--- a/AutonomousAI/main.py+++ b/AutonomousAI/main.py@@ -10,16 +10,17 @@ import timedef print_to_console(title, title_color, content, min_typing_speed=0.05, max_typing_speed=0.01):print(title_color + title + " " + Style.RESET_ALL, end="")- words = content.split()- for i, word in enumerate(words):- print(word, end="", flush=True)- if i < len(words) - 1:- print(" ", end="", flush=True)- typing_speed = random.uniform(min_typing_speed, max_typing_speed)- time.sleep(typing_speed)- # type faster after each word- min_typing_speed = min_typing_speed * 0.95- max_typing_speed = max_typing_speed * 0.95+ if content:+ words = content.split()+ for i, word in enumerate(words):+ print(word, end="", flush=True)+ if i < len(words) - 1:+ print(" ", end="", flush=True)+ typing_speed = random.uniform(min_typing_speed, max_typing_speed)+ time.sleep(typing_speed)+ # type faster after each word+ min_typing_speed = min_typing_speed * 0.95+ max_typing_speed = max_typing_speed * 0.95print()def print_assistant_thoughts(assistant_reply):