Spaces:
Sleeping
Sleeping
OnlyBiggg
commited on
Commit
·
e96cccd
1
Parent(s):
e767c6b
fix
Browse files- app/api/routes.py +3 -1
app/api/routes.py
CHANGED
@@ -293,6 +293,8 @@ async def is_valid_select_trip(request: Request) -> Response:
|
|
293 |
session_info = body.get("sessionInfo", {})
|
294 |
parameters = session_info.get("parameters")
|
295 |
routes_name = parameters.get("routes_name")
|
|
|
|
|
296 |
if raw_input in routes_name:
|
297 |
trip_list: List[Dict[str, any]] = parameters.get("trip_list")
|
298 |
for trip in trip_list:
|
@@ -334,7 +336,7 @@ async def time_trip(request: Request) -> Response:
|
|
334 |
{
|
335 |
"type": "chips",
|
336 |
"options": [
|
337 |
-
{"text": time} for time in time_list
|
338 |
]
|
339 |
}
|
340 |
]
|
|
|
293 |
session_info = body.get("sessionInfo", {})
|
294 |
parameters = session_info.get("parameters")
|
295 |
routes_name = parameters.get("routes_name")
|
296 |
+
if raw_input:
|
297 |
+
raw_input = raw_input.strip()
|
298 |
if raw_input in routes_name:
|
299 |
trip_list: List[Dict[str, any]] = parameters.get("trip_list")
|
300 |
for trip in trip_list:
|
|
|
336 |
{
|
337 |
"type": "chips",
|
338 |
"options": [
|
339 |
+
{"text": time} for i, time in enumerate(time_list) if i < 5
|
340 |
]
|
341 |
}
|
342 |
]
|