From b2d6987cac396960327bc7ec4120a0cd83eb44a6 Mon Sep 17 00:00:00 2001 From: Jacob Hahn Date: Sat, 15 Apr 2023 04:17:00 -0400 Subject: [PATCH] Fixed condition where key could be string --- autogpt/commands.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/autogpt/commands.py b/autogpt/commands.py index 352b3340babd..8f873606c173 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 integer if 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 response if cfg.speak_mode: