Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -93,13 +93,15 @@ def get_paper_content(link:str)->str:
|
|
| 93 |
|
| 94 |
|
| 95 |
@tool
|
| 96 |
-
def related_papers(title:
|
| 97 |
"""
|
| 98 |
A tool that searches for related papers on arXiv based on the title of the query paper.
|
| 99 |
|
| 100 |
Args:
|
| 101 |
title : A string representing the title of the query paper to find related papers for.
|
| 102 |
max_results : An integer representing The number of related papers to return.
|
|
|
|
|
|
|
| 103 |
"""
|
| 104 |
try:
|
| 105 |
search_url = f"http://export.arxiv.org/api/query?search_query=title:{title}&start=0&max_results={max_results}"
|
|
|
|
| 93 |
|
| 94 |
|
| 95 |
@tool
|
| 96 |
+
def related_papers(title:str, max_results:int) -> list:
|
| 97 |
"""
|
| 98 |
A tool that searches for related papers on arXiv based on the title of the query paper.
|
| 99 |
|
| 100 |
Args:
|
| 101 |
title : A string representing the title of the query paper to find related papers for.
|
| 102 |
max_results : An integer representing The number of related papers to return.
|
| 103 |
+
Returns:
|
| 104 |
+
list: A list of dictionaries, each containing a related paper's title and URL.
|
| 105 |
"""
|
| 106 |
try:
|
| 107 |
search_url = f"http://export.arxiv.org/api/query?search_query=title:{title}&start=0&max_results={max_results}"
|