Spaces:
Sleeping
Sleeping
OnlyBiggg
commited on
Commit
·
49b2f06
1
Parent(s):
ee9c681
fix
Browse files- app/api/routes.py +13 -12
app/api/routes.py
CHANGED
@@ -330,18 +330,19 @@ async def time_trip(request: Request) -> Response:
|
|
330 |
"time_list": time_list
|
331 |
}
|
332 |
text = [" | ".join(map(str, time_list))]
|
333 |
-
payload=
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
|
|
345 |
except Exception as e:
|
346 |
print(e)
|
347 |
return DialogFlowResponseAPI(text=["Hệ thống xảy ra lỗi. Quý khách vui lòng thử lại sau hoặc liên hệ Trung tâm tổng đài 1900 6067 để được hỗ trợ."])
|
|
|
330 |
"time_list": time_list
|
331 |
}
|
332 |
text = [" | ".join(map(str, time_list))]
|
333 |
+
payload={
|
334 |
+
"richContent": [
|
335 |
+
[
|
336 |
+
{
|
337 |
+
"type": "chips",
|
338 |
+
"options": [
|
339 |
+
{"text": time} for time in (time_list)
|
340 |
+
]
|
341 |
+
}
|
342 |
+
]
|
343 |
+
]
|
344 |
+
}
|
345 |
+
return DialogFlowResponseAPI(text=text, payload=payload ,parameters=parameters)
|
346 |
except Exception as e:
|
347 |
print(e)
|
348 |
return DialogFlowResponseAPI(text=["Hệ thống xảy ra lỗi. Quý khách vui lòng thử lại sau hoặc liên hệ Trung tâm tổng đài 1900 6067 để được hỗ trợ."])
|