camparchimedes commited on
Commit
31af47b
ยท
verified ยท
1 Parent(s): 62041d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -110,13 +110,10 @@ async def handle_message(message: cl.Message):
110
  api_chain = cl.user_session.get("api_chain")
111
 
112
  is_booking_query = any(
113
- re.search(keyword, user_message, re.IGNORECASE)
114
  for keyword in BOOKING_KEYWORDS + [BOOKING_ID]
115
  )
116
- """
117
- match = re.search(r'\b[A-Z]{6}\d{6}\b', user_message)
118
- return match.group(0) if match else None
119
- """
120
 
121
  if is_booking_query:
122
  response = await api_chain.acall(user_message,
@@ -130,3 +127,4 @@ async def handle_message(message: cl.Message):
130
  return message.content
131
 
132
 
 
 
110
  api_chain = cl.user_session.get("api_chain")
111
 
112
  is_booking_query = any(
113
+ re.search(keyword, user_message, re.IGNORECASE) # re.search(keyword, r'\b[A-Z]{6}\d{6}\b', user_message, re.IGNORECASE)
114
  for keyword in BOOKING_KEYWORDS + [BOOKING_ID]
115
  )
116
+
 
 
 
117
 
118
  if is_booking_query:
119
  response = await api_chain.acall(user_message,
 
127
  return message.content
128
 
129
 
130
+