Update app.py
Browse files
app.py
CHANGED
|
@@ -2610,12 +2610,15 @@ async def agent_query(req: AgentRequest):
|
|
| 2610 |
"&lang=en&mode=advanced&offset=0"
|
| 2611 |
+ _facet
|
| 2612 |
)
|
|
|
|
|
|
|
|
|
|
| 2613 |
answer = (
|
| 2614 |
"I searched PRIMO but couldn't retrieve enough records for a synthesis on this topic. "
|
| 2615 |
-
"This may be because the topic is very niche or recent.
|
| 2616 |
-
"Try searching PRIMO directly:
|
| 2617 |
-
|
| 2618 |
-
"
|
| 2619 |
)
|
| 2620 |
|
| 2621 |
else:
|
|
|
|
| 2610 |
"&lang=en&mode=advanced&offset=0"
|
| 2611 |
+ _facet
|
| 2612 |
)
|
| 2613 |
+
# Return plain URL — fmt() in the frontend will linkify it correctly.
|
| 2614 |
+
# Do NOT embed <a href="..."> here — fmt() would double-wrap the URL
|
| 2615 |
+
# producing <a href="<a href=..."> which browsers mangle into a relative path.
|
| 2616 |
answer = (
|
| 2617 |
"I searched PRIMO but couldn't retrieve enough records for a synthesis on this topic. "
|
| 2618 |
+
"This may be because the topic is very niche or recent.\n\n"
|
| 2619 |
+
"Try searching PRIMO directly:\n"
|
| 2620 |
+
+ _primo_url
|
| 2621 |
+
+ "\n\nOr use the AI research tools below for deeper discovery."
|
| 2622 |
)
|
| 2623 |
|
| 2624 |
else:
|