Spaces:
Runtime error
Runtime error
fix: Cannot generate JSON schema for get_stock_price because the docstring has no description for the argument 'symbol'
Browse files
app.py
CHANGED
|
@@ -35,11 +35,11 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 35 |
|
| 36 |
@tool
|
| 37 |
def get_stock_price(symbol: str) -> str:
|
| 38 |
-
"""The tool that provides the current stock price for given symbol.
|
| 39 |
Args:
|
| 40 |
-
symbol: A string representing the valid stock symbol (eg., 'meta' or 'aapl')
|
| 41 |
"""
|
| 42 |
-
|
| 43 |
api_url = 'https://api.api-ninjas.com/v1/stockprice?ticker={}'.format(symbol)
|
| 44 |
response = requests.get(api_url, headers={'X-Api-Key': 'tLxWjj6xXdYXkyajGKBdKQ==ncmATTD1rqr2s2Hb'})
|
| 45 |
if response.status_code == requests.codes.ok:
|
|
|
|
| 35 |
|
| 36 |
@tool
|
| 37 |
def get_stock_price(symbol: str) -> str:
|
| 38 |
+
"""The tool that provides the current stock price for a given symbol.
|
| 39 |
Args:
|
| 40 |
+
symbol: A string representing the valid stock symbol (eg., 'meta' or 'aapl').
|
| 41 |
"""
|
| 42 |
+
|
| 43 |
api_url = 'https://api.api-ninjas.com/v1/stockprice?ticker={}'.format(symbol)
|
| 44 |
response = requests.get(api_url, headers={'X-Api-Key': 'tLxWjj6xXdYXkyajGKBdKQ==ncmATTD1rqr2s2Hb'})
|
| 45 |
if response.status_code == requests.codes.ok:
|