Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,12 +35,14 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 35 |
|
| 36 |
import re # Import regular expression library
|
| 37 |
|
|
|
|
|
|
|
| 38 |
@tool
|
| 39 |
def get_stock_price(stock: str) -> str:
|
| 40 |
"""
|
| 41 |
Fetches the current stock price using DuckDuckGo search.
|
| 42 |
Args:
|
| 43 |
-
stock
|
| 44 |
Returns:
|
| 45 |
str: A message with the stock price or an error message.
|
| 46 |
"""
|
|
@@ -82,7 +84,6 @@ def get_stock_price(stock: str) -> str:
|
|
| 82 |
|
| 83 |
except Exception as e:
|
| 84 |
return f"Error fetching price for stock '{stock}': {str(e)}"
|
| 85 |
-
|
| 86 |
|
| 87 |
final_answer = FinalAnswerTool()
|
| 88 |
|
|
|
|
| 35 |
|
| 36 |
import re # Import regular expression library
|
| 37 |
|
| 38 |
+
import re # Import regular expression library
|
| 39 |
+
|
| 40 |
@tool
|
| 41 |
def get_stock_price(stock: str) -> str:
|
| 42 |
"""
|
| 43 |
Fetches the current stock price using DuckDuckGo search.
|
| 44 |
Args:
|
| 45 |
+
stock: A stock ticker symbol or company name (e.g., 'AAPL', 'GOOGL'). # Added description here
|
| 46 |
Returns:
|
| 47 |
str: A message with the stock price or an error message.
|
| 48 |
"""
|
|
|
|
| 84 |
|
| 85 |
except Exception as e:
|
| 86 |
return f"Error fetching price for stock '{stock}': {str(e)}"
|
|
|
|
| 87 |
|
| 88 |
final_answer = FinalAnswerTool()
|
| 89 |
|