iamharisai commited on
Commit
f12091e
·
verified ·
1 Parent(s): aab5621

fix: miscellaneous

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -35,10 +35,9 @@ def get_current_time_in_timezone(timezone: str) -> str:
35
 
36
  @tool
37
  def get_stock_price(symbol: str) -> str:
38
- """
39
- The tool that provides the current stock price for given symbol.
40
  Args:
41
- symbol: A string representing the valid stock symbol (eg., 'meta' or 'aapl'
42
  """
43
  # symbol = 'AAPL'
44
  api_url = 'https://api.api-ninjas.com/v1/stockprice?ticker={}'.format(symbol)
@@ -46,7 +45,7 @@ def get_stock_price(symbol: str) -> str:
46
  if response.status_code == requests.codes.ok:
47
  return (response.json()['price'])
48
  else:
49
- print("Error:", response.status_code, response.text)
50
 
51
 
52
  final_answer = FinalAnswerTool()
 
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
  # symbol = 'AAPL'
43
  api_url = 'https://api.api-ninjas.com/v1/stockprice?ticker={}'.format(symbol)
 
45
  if response.status_code == requests.codes.ok:
46
  return (response.json()['price'])
47
  else:
48
+ return ("Error:", response.status_code, response.text)
49
 
50
 
51
  final_answer = FinalAnswerTool()