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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -966,11 +966,12 @@ async def agent_query(req: AgentRequest):
966
  use_claude = req.model == "claude" and bool(os.environ.get("ANTHROPIC_API_KEY"))
967
 
968
  # ---- Early greeting handling ----
969
- if PURE_GREETING_RE.match(question):
 
970
  answer = (
971
  "Hi! I’m <strong>LibBee</strong>, the Khalifa University Library AI Assistant.<br><br>"
972
- "I can help you find articles and books, search databases, access full text, request Interlibrary Loan (ILL), "
973
- "and answer questions about library services and staff.<br><br>"
974
  "Are you looking for one of these? You can also type your question directly."
975
  )
976
  elapsed = time.time() - start
@@ -990,6 +991,7 @@ async def agent_query(req: AgentRequest):
990
  "source_mode": "social",
991
  }
992
 
 
993
  if _looks_library_hours_question(question):
994
  elapsed = time.time() - start
995
  return {
 
966
  use_claude = req.model == "claude" and bool(os.environ.get("ANTHROPIC_API_KEY"))
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, "
974
+ "request Interlibrary Loan (ILL), and answer questions about library services and staff.<br><br>"
975
  "Are you looking for one of these? You can also type your question directly."
976
  )
977
  elapsed = time.time() - start
 
991
  "source_mode": "social",
992
  }
993
 
994
+
995
  if _looks_library_hours_question(question):
996
  elapsed = time.time() - start
997
  return {