Spaces:
Sleeping
Sleeping
OnlyBiggg commited on
Commit ·
5dcf888
1
Parent(s): 0eb84a9
fic
Browse files
app/dialogflow/api/v1/dialogflow.py
CHANGED
|
@@ -65,7 +65,8 @@ async def confirm(request: Request):
|
|
| 65 |
parameters = {}
|
| 66 |
|
| 67 |
if isinstance(time, list):
|
| 68 |
-
|
|
|
|
| 69 |
|
| 70 |
ticket_number = int(raw_ticket_number) if raw_ticket_number else 1
|
| 71 |
date = dialog_service.to_datetime_from_Dialogflow(raw_date)
|
|
@@ -410,19 +411,6 @@ async def check_time_ambiguous(request: Request) -> Response:
|
|
| 410 |
|
| 411 |
if isinstance(time, list) or time is None:
|
| 412 |
parameters["is_time_ambiguous"] = True
|
| 413 |
-
# text = [f"Quý khách dự định đi vào lúc"]
|
| 414 |
-
# payload={
|
| 415 |
-
# "richContent": [
|
| 416 |
-
# [
|
| 417 |
-
# {
|
| 418 |
-
# "type": "chips",
|
| 419 |
-
# "options": [
|
| 420 |
-
# {"text": item} for item in (time)
|
| 421 |
-
# ]
|
| 422 |
-
# }
|
| 423 |
-
# ]
|
| 424 |
-
# ]
|
| 425 |
-
# }
|
| 426 |
else:
|
| 427 |
parameters["is_time_ambiguous"] = None
|
| 428 |
|
|
|
|
| 65 |
parameters = {}
|
| 66 |
|
| 67 |
if isinstance(time, list):
|
| 68 |
+
parameters["is_time_ambiguous"] = True
|
| 69 |
+
return DialogFlowResponseAPI(parameters=parameters)
|
| 70 |
|
| 71 |
ticket_number = int(raw_ticket_number) if raw_ticket_number else 1
|
| 72 |
date = dialog_service.to_datetime_from_Dialogflow(raw_date)
|
|
|
|
| 411 |
|
| 412 |
if isinstance(time, list) or time is None:
|
| 413 |
parameters["is_time_ambiguous"] = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 414 |
else:
|
| 415 |
parameters["is_time_ambiguous"] = None
|
| 416 |
|