nikeshn commited on
Commit
f4c90b4
·
verified ·
1 Parent(s): acfb205

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -967,7 +967,8 @@ async def agent_query(req: AgentRequest):
967
 
968
  # ---- Early greeting handling ----
969
  q_clean = question.strip()
970
- if PURE_GREETING_RE.match(q_clean):
 
971
  answer = (
972
  "Hi! I’m <strong>LibBee</strong>, the Khalifa University Library AI Assistant.<br><br>"
973
  "I can help you find articles and books, search databases, access full text, "
 
967
 
968
  # ---- Early greeting handling ----
969
  q_clean = question.strip()
970
+ q_norm = re.sub(r"\s+", " ", q_clean.lower()).strip(" !?.")
971
+ if PURE_GREETING_RE.match(q_clean) or q_norm in {"hi", "hello", "hey", "good morning", "good afternoon", "good evening"}:
972
  answer = (
973
  "Hi! I’m <strong>LibBee</strong>, the Khalifa University Library AI Assistant.<br><br>"
974
  "I can help you find articles and books, search databases, access full text, "