OnlyBiggg commited on
Commit
78566ad
·
1 Parent(s): 5b760a2
app/dialogflow/services/dialog_service.py CHANGED
@@ -76,6 +76,8 @@ class DialogService:
76
  async def search_trip(from_time: int, to_time: int, route_ids: list[int], ticket_count: int = 1):
77
  try:
78
  payload = { k: v for k, v in {
 
 
79
  "from_time": from_time,
80
  "to_time": to_time,
81
  "route_ids": route_ids,
 
76
  async def search_trip(from_time: int, to_time: int, route_ids: list[int], ticket_count: int = 1):
77
  try:
78
  payload = { k: v for k, v in {
79
+ "channel": "web_client",
80
+ "only_online_trip": True,
81
  "from_time": from_time,
82
  "to_time": to_time,
83
  "route_ids": route_ids,
common/external/external_api.py CHANGED
@@ -45,10 +45,12 @@ class API():
45
 
46
  @staticmethod
47
  async def post(endpoint: str , payload: Dict[str, Any] = None,headers: Optional[Dict[str, str]] = None, api_base: str = None):
 
48
  if api_base:
49
  url = f"{api_base}{endpoint}"
50
  else:
51
  url = f"{API_BASE_URL}{endpoint}"
 
52
  access_token = await get_access_token()
53
  headers = headers or {}
54
  headers.setdefault("Content-Type", "application/json")
 
45
 
46
  @staticmethod
47
  async def post(endpoint: str , payload: Dict[str, Any] = None,headers: Optional[Dict[str, str]] = None, api_base: str = None):
48
+ url = ""
49
  if api_base:
50
  url = f"{api_base}{endpoint}"
51
  else:
52
  url = f"{API_BASE_URL}{endpoint}"
53
+ print(url)
54
  access_token = await get_access_token()
55
  headers = headers or {}
56
  headers.setdefault("Content-Type", "application/json")