mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
Update serper_dev_tool.py
This commit is contained in:
@@ -38,15 +38,12 @@ class SerperDevTool(BaseTool):
|
||||
save_file = kwargs.get('save_file', self.save_file)
|
||||
n_results = kwargs.get('n_results', self.n_results)
|
||||
|
||||
payload = json.dumps(
|
||||
{
|
||||
"q": search_query,
|
||||
"num": n_results,
|
||||
"gl": self.country,
|
||||
"location": self.location,
|
||||
"hl": self.locale,
|
||||
}
|
||||
)
|
||||
payload = { "q": search_query, "num": n_results }
|
||||
payload["gl"] = self.country if self.country
|
||||
payload["location"] = self.country if self.location
|
||||
payload["hl"] = self.country if self.locale
|
||||
|
||||
payload = json.dumps(payload)
|
||||
|
||||
headers = {
|
||||
'X-API-KEY': os.environ['SERPER_API_KEY'],
|
||||
|
||||
Reference in New Issue
Block a user