Update app.py
Browse files
app.py
CHANGED
|
@@ -967,7 +967,8 @@ async def agent_query(req: AgentRequest):
|
|
| 967 |
|
| 968 |
# ---- Early greeting handling ----
|
| 969 |
q_clean = question.strip()
|
| 970 |
-
|
|
|
|
| 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, "
|