AlanRex commited on
Commit
dfa305f
·
verified ·
1 Parent(s): 18b8ac0

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -229,7 +229,7 @@ def parse_date(date_str):
229
  except ValueError:
230
  pass
231
 
232
- return None, "❌ 日期格式不正確\n例如:明天、12/26"
233
 
234
  def validate_time(time_str):
235
  time_keywords = ["點", "時", ":", "-", "到", "至", "~"]
@@ -312,7 +312,7 @@ def handle_booking_flow(user_id, user_message):
312
  if current_state == BookingState.IDLE:
313
  if is_booking_keyword(user_message):
314
  booking["state"] = BookingState.ASKING_DATE
315
- return "🎹 琴房預約系統\n\n📅 請問預約日期?\n例如:明天、12/26"
316
  return None
317
 
318
  elif current_state == BookingState.ASKING_DATE:
 
229
  except ValueError:
230
  pass
231
 
232
+ return None, "❌ 日期格式不正確\n例如:明天、2025-12-26"
233
 
234
  def validate_time(time_str):
235
  time_keywords = ["點", "時", ":", "-", "到", "至", "~"]
 
312
  if current_state == BookingState.IDLE:
313
  if is_booking_keyword(user_message):
314
  booking["state"] = BookingState.ASKING_DATE
315
+ return "🎹 琴房預約系統\n\n📅 請問預約日期?\n例如:明天、2025-12-26"
316
  return None
317
 
318
  elif current_state == BookingState.ASKING_DATE: