hbhamzabaig commited on
Commit
aca2bf0
·
verified ·
1 Parent(s): 309602c

Create utils.py

Browse files
Files changed (1) hide show
  1. utils.py +19 -0
utils.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from serpapi import GoogleSearch
2
+ import json
3
+
4
+ def get_restaurant_info(query):
5
+ params = {
6
+ 'q': query,
7
+ 'api_key': 'YOUR_SERP_API_KEY'
8
+ }
9
+ search = GoogleSearch(params)
10
+ results = search.get_dict()
11
+ return results
12
+
13
+ def get_flight_info(destination):
14
+ # Fetch flight information from a travel API
15
+ return {"flights": [{"flight": "Flight1", "price": "$200"}]} # Mock Data
16
+
17
+ def get_hotel_info(destination):
18
+ # Fetch hotel information from a hotel API
19
+ return {"hotels": [{"hotel": "Hotel1", "price": "$100"}]} # Mock Data