Merge pull request #1793 from ickma/fix-google-search-encoding

Fix google api fetch error
This commit is contained in:
BillSchumacher
2023-04-16 04:10:39 -05:00
committed by GitHub

View File

@@ -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":