OnlyBiggg commited on
Commit
9f2d489
·
1 Parent(s): 1c16907
app/dialogflow/api/v1/dialogflow.py CHANGED
@@ -24,6 +24,7 @@ async def search_origin_office(request: Request):
24
  raw_departure_city = session_info.get("departure_city")
25
  origin_office = parameters.get("origin_office")
26
 
 
27
  if origin_office and raw_departure_city is None:
28
  departure_city = dialog_service.get_origin_city_from_office(origin_office)
29
 
@@ -41,6 +42,7 @@ async def search_destination_office(request: Request):
41
  raw_destination_city = session_info.get("destination_city")
42
  dest_office = parameters.get("dest_office")
43
 
 
44
  if dest_office and raw_destination_city is None:
45
  destination_city = dialog_service.get_destination_city_from_office(dest_office)
46
 
@@ -175,7 +177,6 @@ async def route(request: Request):
175
  ]
176
  }
177
  return DialogFlowResponseAPI(text=text, payload=payload)
178
- # return DialogFlowResponeAPI(text=['Hello'])
179
  except Exception as e:
180
  return DialogFlowResponseAPI(text=["Hệ thống xảy ra lỗi. Quý khách vui lòng thử lại sau hoặc liên hệ Trung tâm tổng đài 1900 6067 để được hỗ trợ."])
181
 
 
24
  raw_departure_city = session_info.get("departure_city")
25
  origin_office = parameters.get("origin_office")
26
 
27
+ departure_city = None
28
  if origin_office and raw_departure_city is None:
29
  departure_city = dialog_service.get_origin_city_from_office(origin_office)
30
 
 
42
  raw_destination_city = session_info.get("destination_city")
43
  dest_office = parameters.get("dest_office")
44
 
45
+ destination_city = None
46
  if dest_office and raw_destination_city is None:
47
  destination_city = dialog_service.get_destination_city_from_office(dest_office)
48
 
 
177
  ]
178
  }
179
  return DialogFlowResponseAPI(text=text, payload=payload)
 
180
  except Exception as e:
181
  return DialogFlowResponseAPI(text=["Hệ thống xảy ra lỗi. Quý khách vui lòng thử lại sau hoặc liên hệ Trung tâm tổng đài 1900 6067 để được hỗ trợ."])
182