Fix google result encoding.

This commit is contained in:
SBNovaScript
2023-04-15 16:03:22 -04:00
committed by Pi
parent 5634eee2cf
commit f02b6832e2

View File

@@ -128,8 +128,8 @@ def execute_command(command_name: str, arguments):
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_single.encode('utf-8', 'ignore') for google_result_single in google_result]
return str(safe_message)
elif command_name == "memory_add":
return memory.add(arguments["string"])
elif command_name == "start_agent":