mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-20 05:34:25 +01:00
Merge pull request #1507 from jacobtohahn/fix_agent_key_error
Fix agent key error
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user