Spaces:
Runtime error
Runtime error
Saketh Reddy
commited on
Commit
·
0c81142
1
Parent(s):
e26e602
Fixed return/ signature
Browse files- functions.py +2 -4
functions.py
CHANGED
@@ -44,7 +44,7 @@ def call_function(messages, function_call):
|
|
44 |
else:
|
45 |
raise Exception("Function does not exist and cannot be called")
|
46 |
|
47 |
-
def get_order_tracking_status(email_address: str, order_number: int):
|
48 |
url = "https://www.lowes.com/api/mylowes/orders/details"
|
49 |
|
50 |
payload = json.dumps({
|
@@ -73,6 +73,4 @@ def get_order_tracking_status(email_address: str, order_number: int):
|
|
73 |
|
74 |
response = requests.request("POST", url, headers=headers, data=payload)
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
return "The order was delivered on Monday, November 12th"
|
|
|
44 |
else:
|
45 |
raise Exception("Function does not exist and cannot be called")
|
46 |
|
47 |
+
def get_order_tracking_status(email_address: str, order_number: int) -> str:
|
48 |
url = "https://www.lowes.com/api/mylowes/orders/details"
|
49 |
|
50 |
payload = json.dumps({
|
|
|
73 |
|
74 |
response = requests.request("POST", url, headers=headers, data=payload)
|
75 |
|
76 |
+
return response.text
|
|
|
|