cpatino10 commited on
Commit
0671e43
·
verified ·
1 Parent(s): e2dc932

updated app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -14,9 +14,7 @@ from Gradio_UI import GradioUI
14
  def fetch_historical_price_data(symbol: str, start_date: str) -> list[dict]:
15
  """
16
  Fetch daily historical stock price data for a given stock symbol from the start_date. Use
17
- toda=datetime.now() to confirm the start_Date is valid prior to calling the API. You only need to make sure
18
- the start_date is not greater than today's date. If it is equal to today's date you can send today's date as the API
19
- will output the stock price information for the day.
20
 
21
  Args:
22
  symbol: Stock market symbol such as 'AAPL', 'MSFT', 'NVDA'
@@ -27,7 +25,7 @@ def fetch_historical_price_data(symbol: str, start_date: str) -> list[dict]:
27
  if not FMP_KEY:
28
  return [{"error": "Missing FMP_KEY environment variable"}]
29
 
30
- # inside your tool
31
  today_dt = datetime.now().date()
32
  try:
33
  start_dt = datetime.strptime(start_date, "%Y-%m-%d").date()
 
14
  def fetch_historical_price_data(symbol: str, start_date: str) -> list[dict]:
15
  """
16
  Fetch daily historical stock price data for a given stock symbol from the start_date. Use
17
+ the date validation logic in the tool to validate the date.
 
 
18
 
19
  Args:
20
  symbol: Stock market symbol such as 'AAPL', 'MSFT', 'NVDA'
 
25
  if not FMP_KEY:
26
  return [{"error": "Missing FMP_KEY environment variable"}]
27
 
28
+ # date validation
29
  today_dt = datetime.now().date()
30
  try:
31
  start_dt = datetime.strptime(start_date, "%Y-%m-%d").date()