Spaces:
Sleeping
Sleeping
OnlyBiggg
commited on
Commit
·
7454417
1
Parent(s):
b7a31e3
fix
Browse files
app/dialogflow/api/v1/dialogflow.py
CHANGED
|
@@ -417,8 +417,20 @@ async def time_trip(request: Request) -> Response:
|
|
| 417 |
parameters["time_select"] = None
|
| 418 |
parameters["is_time_ambiguous"] = True
|
| 419 |
text = [f"Quý khách dự định đi vào lúc"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 420 |
else:
|
| 421 |
-
text = []
|
| 422 |
if is_has_time:
|
| 423 |
text = [f"Quý khách lựa chọn thời gian chuyến {route_name}\n" + " | ".join([item["time"] for item in quick_time_reply])]
|
| 424 |
parameters["is_has_time"] = None
|
|
|
|
| 417 |
parameters["time_select"] = None
|
| 418 |
parameters["is_time_ambiguous"] = True
|
| 419 |
text = [f"Quý khách dự định đi vào lúc"]
|
| 420 |
+
payload={
|
| 421 |
+
"richContent": [
|
| 422 |
+
[
|
| 423 |
+
{
|
| 424 |
+
"type": "chips",
|
| 425 |
+
"options": [
|
| 426 |
+
{"text": item} for item in (time)
|
| 427 |
+
]
|
| 428 |
+
}
|
| 429 |
+
]
|
| 430 |
+
]
|
| 431 |
+
}
|
| 432 |
+
return DialogFlowResponseAPI(text=text, payload=payload ,parameters=parameters)
|
| 433 |
else:
|
|
|
|
| 434 |
if is_has_time:
|
| 435 |
text = [f"Quý khách lựa chọn thời gian chuyến {route_name}\n" + " | ".join([item["time"] for item in quick_time_reply])]
|
| 436 |
parameters["is_has_time"] = None
|