Spaces:
Runtime error
Runtime error
fix: miscellaneous
Browse files34 unmodified lines353637383940414243441 unmodified line4647484950515234 unmodified lines@tooldef get_stock_price(symbol: str) -> str:"""The tool that provides the current stock price for given symbol.Args:symbol: A string representing the valid stock symbol (eg., 'meta' or 'aapl'"""# symbol = 'AAPL'api_url = 'https://api.api-ninjas.com/v1/stockprice?ticker={}'.format(symbol)1 unmodified lineif response.status_code == requests.codes.ok:return (response.json()['price'])else:print("Error:", response.status_code, response.text)final_answer = FinalAnswerTool()34 unmodified lines3536373839404142431 unmodified line4546474849505134 unmodified lines@tooldef get_stock_price(symbol: str) -> str:"""The tool that provides the current stock price for given symbol.Args:symbol: A string representing the valid stock symbol (eg., 'meta' or 'aapl')"""# symbol = 'AAPL'api_url = 'https://api.api-ninjas.com/v1/stockprice?ticker={}'.format(symbol)1 unmodified lineif response.status_code == requests.codes.ok:return (response.json()['price'])else:return ("Error:", response.status_code, response.text)final_answer = FinalAnswerTool()
app.py+3-4