Update src/api/agent.py
Browse files- src/api/agent.py +9 -2
src/api/agent.py
CHANGED
|
@@ -2890,8 +2890,15 @@ def _search_answer_intro(context: SearchContextPayload, is_follow_up: bool) -> s
|
|
| 2890 |
resource = {"books": "books", "articles": "articles", "both": "articles and books"}.get(context.resource_type, "articles")
|
| 2891 |
location = "PubMed" if context.source == "pubmed" else "KU Library catalogue"
|
| 2892 |
if is_follow_up:
|
| 2893 |
-
|
| 2894 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2895 |
|
| 2896 |
|
| 2897 |
async def _run_search_mode(
|
|
|
|
| 2890 |
resource = {"books": "books", "articles": "articles", "both": "articles and books"}.get(context.resource_type, "articles")
|
| 2891 |
location = "PubMed" if context.source == "pubmed" else "KU Library catalogue"
|
| 2892 |
if is_follow_up:
|
| 2893 |
+
action = f"I updated your previous search on <strong>{topic}</strong> in the <strong>{location}</strong> and looked for <strong>{resource}</strong>."
|
| 2894 |
+
else:
|
| 2895 |
+
action = f"I searched for <strong>{resource}</strong> on <strong>{topic}</strong>."
|
| 2896 |
+
writeup = (
|
| 2897 |
+
"<br><br>Your query has been prepared and pre-loaded across multiple platforms. "
|
| 2898 |
+
"Click any platform below to search instantly, or use the boolean search tip "
|
| 2899 |
+
"to search directly in any KU database."
|
| 2900 |
+
)
|
| 2901 |
+
return action + writeup
|
| 2902 |
|
| 2903 |
|
| 2904 |
async def _run_search_mode(
|