From 2cd835e5a4e0a95b166bfa032e173e554003fcd2 Mon Sep 17 00:00:00 2001 From: k-boikov <64261260+k-boikov@users.noreply.github.com> Date: Wed, 17 May 2023 06:20:02 +0300 Subject: [PATCH] Added custom_search_engine_id as mandatory for official google search (#4228) Co-authored-by: Nicholas Tindle --- autogpt/commands/google_search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autogpt/commands/google_search.py b/autogpt/commands/google_search.py index 1fc974cd..02909448 100644 --- a/autogpt/commands/google_search.py +++ b/autogpt/commands/google_search.py @@ -41,8 +41,8 @@ def google_search(query: str, num_results: int = 8) -> str: "google", "Google Search", '"query": ""', - bool(CFG.google_api_key), - "Configure google_api_key.", + bool(CFG.google_api_key) and bool(CFG.custom_search_engine_id), + "Configure google_api_key and custom_search_engine_id.", ) def google_official_search(query: str, num_results: int = 8) -> str | list[str]: """Return the results of a Google search using the official Google API