Spaces:
Sleeping
Sleeping
OnlyBiggg
commited on
Commit
·
f84eb49
1
Parent(s):
a88211d
fix
Browse files- app/api/routes.py +11 -0
app/api/routes.py
CHANGED
|
@@ -328,6 +328,17 @@ async def time_trip(request: Request) -> Response:
|
|
| 328 |
"time_list": time_list
|
| 329 |
}
|
| 330 |
text = [" | ".join(map(str, time_list))]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
return DialogFlowResponseAPI(text=text, parameters=parameters)
|
| 332 |
except Exception as e:
|
| 333 |
print(e)
|
|
|
|
| 328 |
"time_list": time_list
|
| 329 |
}
|
| 330 |
text = [" | ".join(map(str, time_list))]
|
| 331 |
+
payload= {
|
| 332 |
+
"richContent":
|
| 333 |
+
[
|
| 334 |
+
{
|
| 335 |
+
"type": "chips",
|
| 336 |
+
"options": [
|
| 337 |
+
{"text": time} for time in time_list
|
| 338 |
+
]
|
| 339 |
+
}
|
| 340 |
+
]
|
| 341 |
+
}
|
| 342 |
return DialogFlowResponseAPI(text=text, parameters=parameters)
|
| 343 |
except Exception as e:
|
| 344 |
print(e)
|