Pijush2023 commited on
Commit
fa93849
·
verified ·
1 Parent(s): 355071a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -355,7 +355,7 @@ def generate_map(location_names):
355
 
356
 
357
  # Step 1: Define the Yelp Search Tool
358
- class YelpSearchTool(BaseTool):
359
  name = "YelpSearch"
360
  description = "A tool to search for restaurants in Birmingham, AL using Yelp."
361
 
@@ -364,7 +364,7 @@ class YelpSearchTool(BaseTool):
364
  "engine": "yelp",
365
  "find_desc": "Restaurant",
366
  "find_loc": "Birmingham, AL, USA",
367
- "api_key": os.getenv("SERP_API")
368
  }
369
 
370
  response = requests.get("https://serpapi.com/search.json", params=params)
@@ -385,9 +385,6 @@ class YelpSearchTool(BaseTool):
385
  else:
386
  return f"Failed to fetch data from Yelp. Status code: {response.status_code}"
387
 
388
- def _arun(self, query: str):
389
- raise NotImplementedError("YelpSearchTool does not support async execution.")
390
-
391
  # Initialize the LLM and the Tool
392
  yelp_tool = YelpSearchTool()
393
  tools = [
 
355
 
356
 
357
  # Step 1: Define the Yelp Search Tool
358
+ class YelpSearchTool:
359
  name = "YelpSearch"
360
  description = "A tool to search for restaurants in Birmingham, AL using Yelp."
361
 
 
364
  "engine": "yelp",
365
  "find_desc": "Restaurant",
366
  "find_loc": "Birmingham, AL, USA",
367
+ "api_key": os.getenv("SERP_API_KEY")
368
  }
369
 
370
  response = requests.get("https://serpapi.com/search.json", params=params)
 
385
  else:
386
  return f"Failed to fetch data from Yelp. Status code: {response.status_code}"
387
 
 
 
 
388
  # Initialize the LLM and the Tool
389
  yelp_tool = YelpSearchTool()
390
  tools = [