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.
Fixed condition where key could be string
Jacob Hahnb2d6987cac39
diff --git a/autogpt/commands.py b/autogpt/commands.pyindex 352b3340ba..8f873606c1 100644--- a/autogpt/commands.py+++ b/autogpt/commands.py@@ -251,11 +251,8 @@ def message_agent(key, message):# Check if the key is a valid integerif is_valid_int(key):agent_response = agents.message_agent(int(key), message)- # Check if the key is a valid string- elif isinstance(key, str):- agent_response = agents.message_agent(key, message)else:- return "Invalid key, must be an integer or a string."+ return "Invalid key, must be an integer."# Speak responseif cfg.speak_mode: