Spaces:
Sleeping
Sleeping
OnlyBiggg
commited on
Commit
·
df0b6b9
1
Parent(s):
9ed1dc8
fix
Browse files- app/api/routes.py +1 -0
- app/types/Respone.py +1 -1
app/api/routes.py
CHANGED
|
@@ -257,6 +257,7 @@ async def booking_trip(request: Request) -> Response:
|
|
| 257 |
"trip_list": trips,
|
| 258 |
"routes_name": routes_name
|
| 259 |
}
|
|
|
|
| 260 |
return DialogFlowResponseAPI(text=text, payload=payload,parameters=parameters)
|
| 261 |
|
| 262 |
text = [f"Hệ thống không tìm thấy tuyến xe **{raw_departure_city}** - **{raw_destination_city}**.\n Quý khách vui lòng thử lại với lộ trình khác hoặc liên hệ Trung tâm tổng đài 1900 6067 để được hỗ trợ."]
|
|
|
|
| 257 |
"trip_list": trips,
|
| 258 |
"routes_name": routes_name
|
| 259 |
}
|
| 260 |
+
print(parameters)
|
| 261 |
return DialogFlowResponseAPI(text=text, payload=payload,parameters=parameters)
|
| 262 |
|
| 263 |
text = [f"Hệ thống không tìm thấy tuyến xe **{raw_departure_city}** - **{raw_destination_city}**.\n Quý khách vui lòng thử lại với lộ trình khác hoặc liên hệ Trung tâm tổng đài 1900 6067 để được hỗ trợ."]
|
app/types/Respone.py
CHANGED
|
@@ -34,7 +34,7 @@ def DialogFlowResponseAPI(text: List[str] = None, payload: Optional[Dict[str, An
|
|
| 34 |
|
| 35 |
response_data = DialogflowResponse(
|
| 36 |
fulfillment_response=FulfillmentResponse(messages=messages),
|
| 37 |
-
sessionInfo=SessionInfo(parameters=parameters)
|
| 38 |
)
|
| 39 |
|
| 40 |
return JSONResponse(content=response_data.model_dump())
|
|
|
|
| 34 |
|
| 35 |
response_data = DialogflowResponse(
|
| 36 |
fulfillment_response=FulfillmentResponse(messages=messages),
|
| 37 |
+
sessionInfo=SessionInfo(parameters=parameters or {})
|
| 38 |
)
|
| 39 |
|
| 40 |
return JSONResponse(content=response_data.model_dump())
|