Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,15 +60,17 @@ def get_stock_price(stock: str) -> str:
|
|
| 60 |
return f"Error fetching price for stock '{stock}': {str(e)}"
|
| 61 |
|
| 62 |
|
|
|
|
| 63 |
@tool
|
| 64 |
def web_search(query: str) -> dict:
|
| 65 |
-
"""
|
|
|
|
| 66 |
|
| 67 |
Args:
|
| 68 |
-
query (str):
|
| 69 |
|
| 70 |
Returns:
|
| 71 |
-
dict: A dictionary containing the query and the top
|
| 72 |
"""
|
| 73 |
try:
|
| 74 |
# Initialize the search tool
|
|
|
|
| 60 |
return f"Error fetching price for stock '{stock}': {str(e)}"
|
| 61 |
|
| 62 |
|
| 63 |
+
|
| 64 |
@tool
|
| 65 |
def web_search(query: str) -> dict:
|
| 66 |
+
"""
|
| 67 |
+
Fetches the result from a web search using DuckDuckGo.
|
| 68 |
|
| 69 |
Args:
|
| 70 |
+
query (str): A search query or question.
|
| 71 |
|
| 72 |
Returns:
|
| 73 |
+
dict: A dictionary containing the search query and the top result.
|
| 74 |
"""
|
| 75 |
try:
|
| 76 |
# Initialize the search tool
|