Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix agent key error #1507

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions autogpt/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,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