Amalia
commited on
Commit
·
d0c1441
1
Parent(s):
37f62c4
fix typos
Browse files
app.py
CHANGED
|
@@ -53,13 +53,13 @@ def web_search(query: str) -> str:
|
|
| 53 |
return {"web_results": formatted_search_docs}
|
| 54 |
|
| 55 |
@tool
|
| 56 |
-
def arxiv_search(query: str
|
| 57 |
"""Search Arxiv for a query and return maximum 3 result.
|
| 58 |
Args:
|
| 59 |
query: The search query.
|
| 60 |
load_max_docs: The maximum number of documents to load.
|
| 61 |
"""
|
| 62 |
-
search_docs = ArxivLoader(query=query, load_max_docs=
|
| 63 |
formatted_search_docs = "\n\n---\n\n".join(
|
| 64 |
[
|
| 65 |
f'<Document Title="{doc.metadata["Title"]}" Published="{doc.metadata["Published"]}" Authors="{doc.metadata["Authors"]} Summary={doc.metadata["Summary"]}"/>\n{doc.page_content}\n</Document>'
|
|
@@ -76,7 +76,8 @@ def wikipedia_search(query: str, load_max_docs: int=3) -> str:
|
|
| 76 |
load_max_docs: The maximum number of documents to load.
|
| 77 |
"""
|
| 78 |
search_docs = WikipediaLoader(query=query, load_max_docs=load_max_docs).load()
|
| 79 |
-
return {"wikipedia_results": search_docs}
|
|
|
|
| 80 |
|
| 81 |
# --- Basic Agent Definition ---
|
| 82 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
|
|
|
| 53 |
return {"web_results": formatted_search_docs}
|
| 54 |
|
| 55 |
@tool
|
| 56 |
+
def arxiv_search(query: str) -> str:
|
| 57 |
"""Search Arxiv for a query and return maximum 3 result.
|
| 58 |
Args:
|
| 59 |
query: The search query.
|
| 60 |
load_max_docs: The maximum number of documents to load.
|
| 61 |
"""
|
| 62 |
+
search_docs = ArxivLoader(query=query, load_max_docs=3).load()
|
| 63 |
formatted_search_docs = "\n\n---\n\n".join(
|
| 64 |
[
|
| 65 |
f'<Document Title="{doc.metadata["Title"]}" Published="{doc.metadata["Published"]}" Authors="{doc.metadata["Authors"]} Summary={doc.metadata["Summary"]}"/>\n{doc.page_content}\n</Document>'
|
|
|
|
| 76 |
load_max_docs: The maximum number of documents to load.
|
| 77 |
"""
|
| 78 |
search_docs = WikipediaLoader(query=query, load_max_docs=load_max_docs).load()
|
| 79 |
+
# return {"wikipedia_results": search_docs}
|
| 80 |
+
return search_docs
|
| 81 |
|
| 82 |
# --- Basic Agent Definition ---
|
| 83 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|