Skip to content

Commit

Permalink
Merge pull request #2093 from lengweiping1983/master
Browse files Browse the repository at this point in the history
memory object move to memory_add block
  • Loading branch information
richbeales committed Apr 17, 2023
2 parents d063436 + 00ba50b commit 935481c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autogpt/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,10 @@ def execute_command(command_name: str, arguments):
arguments (dict): The arguments for the command
Returns:
str: The result of the command"""
memory = get_memory(CFG)

str: The result of the command
"""
try:
command_name = map_command_synonyms(command_name)
command_name = map_command_synonyms(command_name.lower())
if command_name == "google":
# Check if the Google API key is set and use the official search method
# If the API key is not set or has only whitespaces, use the unofficial
Expand All @@ -140,6 +139,7 @@ def execute_command(command_name: str, arguments):

return str(safe_message)
elif command_name == "memory_add":
memory = get_memory(CFG)
return memory.add(arguments["string"])
elif command_name == "start_agent":
return start_agent(
Expand Down

0 comments on commit 935481c

Please sign in to comment.