Skip to content

Commit

Permalink
Fix google api fetch error
Browse files Browse the repository at this point in the history
  • Loading branch information
chao ma committed Apr 16, 2023
1 parent 6703bee commit 2576b29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions autogpt/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ def execute_command(command_name: str, arguments):
key = CFG.google_api_key
if key and key.strip() and key != "your-google-api-key":
google_result = google_official_search(arguments["input"])
return google_result
else:
google_result = google_search(arguments["input"])
safe_message = google_result.encode("utf-8", "ignore")
return str(safe_message)
safe_message = google_result.encode("utf-8", "ignore")
return str(safe_message)
elif command_name == "memory_add":
return memory.add(arguments["string"])
elif command_name == "start_agent":
Expand Down

0 comments on commit 2576b29

Please sign in to comment.