Skip to content

Commit

Permalink
Merge pull request Significant-Gravitas#1507 from jacobtohahn/fix_age…
Browse files Browse the repository at this point in the history
…nt_key_error

Fix agent key error
  • Loading branch information
richbeales authored Apr 15, 2023
2 parents 9e284fc + 5a58db5 commit f40fa0f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions autogpt/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,8 @@ def message_agent(key: str, message: str) -> str:
# Check if the key is a valid integer
if is_valid_int(key):
agent_response = AGENT_MANAGER.message_agent(int(key), message)
# Check if the key is a valid string
elif isinstance(key, str):
agent_response = AGENT_MANAGER.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:
Expand Down

0 comments on commit f40fa0f

Please sign in to comment.