Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,7 +102,15 @@ def web_search(query: str) -> str:
|
|
| 102 |
|
| 103 |
@tool
|
| 104 |
def wikipedia_tool(query: str) -> str:
|
| 105 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
try:
|
| 107 |
search_docs = WikipediaLoader(query=query, load_max_docs=2).load()
|
| 108 |
formatted_search_docs = "\n\n---\n\n".join(
|
|
|
|
| 102 |
|
| 103 |
@tool
|
| 104 |
def wikipedia_tool(query: str) -> str:
|
| 105 |
+
"""
|
| 106 |
+
Searches Wikipedia for the given query and returns a summary.
|
| 107 |
+
|
| 108 |
+
Args:
|
| 109 |
+
query (str): The search term or question to look up on Wikipedia.
|
| 110 |
+
|
| 111 |
+
Returns:
|
| 112 |
+
str: A summary or error message.
|
| 113 |
+
"""
|
| 114 |
try:
|
| 115 |
search_docs = WikipediaLoader(query=query, load_max_docs=2).load()
|
| 116 |
formatted_search_docs = "\n\n---\n\n".join(
|