baskadir commited on
Commit
6c04fa4
·
verified ·
1 Parent(s): 0367f71

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -34,18 +34,18 @@ def get_current_time_in_timezone(timezone: str) -> str:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
  @tool
37
- def get_list_of_hotels(location: str, price: int) -> list:
38
  """Fetches the most suitable 10 hotels in a given location and price range.
39
 
40
  Args:
41
- location (str): The city or area where hotels should be searched.
42
- price (str): The preferred price range (e.g., 'budget', 'mid-range', 'luxury', or '50-100 USD').
43
 
44
  Returns:
45
  list: A list of dictionaries containing hotel titles, URLs, and snippets.
46
  """
47
  try:
48
- query = f"best hotels in {location} in {price} range"
49
 
50
  with DuckDuckGoSearchTool as ddgs:
51
  results = ddgs.text(query, max_results=10)
 
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
  @tool
37
+ def find_hotels(location: str, price_range: str) -> list:
38
  """Fetches the most suitable 10 hotels in a given location and price range.
39
 
40
  Args:
41
+ location: A string representation of city or area where hotels should be searched. (e.g. 'America', 'Italy', 'Miami', 'Paris')
42
+ price_range: A string representation of the preferred price range (e.g., 'budget', 'mid-range', 'luxury').
43
 
44
  Returns:
45
  list: A list of dictionaries containing hotel titles, URLs, and snippets.
46
  """
47
  try:
48
+ query = f"best hotels in {location} in {price_range} range"
49
 
50
  with DuckDuckGoSearchTool as ddgs:
51
  results = ddgs.text(query, max_results=10)