Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -30,12 +30,12 @@ assistant_id = "asst_YWSKwQEiYVGApJdxxrTH0Cy8"
|
|
30 |
|
31 |
assistant, thread = None, None
|
32 |
|
33 |
-
def today_tool() ->
|
34 |
"""Returns today's date. Use this function for any questions related to knowing today's date.
|
35 |
There should be no input. This function always returns today's date."""
|
36 |
return str(date.today())
|
37 |
|
38 |
-
def yf_download_tool(tickers: List[str], start_date: date, end_date: date) ->
|
39 |
"""Returns historical stock data for a list of given tickers from start date to end date
|
40 |
using the yfinance library download function.
|
41 |
Use this function for any questions related to getting historical stock data.
|
@@ -43,7 +43,7 @@ def yf_download_tool(tickers: List[str], start_date: date, end_date: date) -> st
|
|
43 |
This function always returns a pandas DataFrame."""
|
44 |
return yf.download(tickers, start=start_date, end=end_date)
|
45 |
|
46 |
-
def tavily_search_tool(query: str) ->
|
47 |
"""Searches the web for a given query and returns an answer, "
|
48 |
ready for use as context in a RAG application, using the Tavily API.
|
49 |
Use this function for any questions requiring knowledge not available to the model.
|
|
|
30 |
|
31 |
assistant, thread = None, None
|
32 |
|
33 |
+
def today_tool() -> str:
|
34 |
"""Returns today's date. Use this function for any questions related to knowing today's date.
|
35 |
There should be no input. This function always returns today's date."""
|
36 |
return str(date.today())
|
37 |
|
38 |
+
def yf_download_tool(tickers: List[str], start_date: date, end_date: date) -> pd.DataFrame:
|
39 |
"""Returns historical stock data for a list of given tickers from start date to end date
|
40 |
using the yfinance library download function.
|
41 |
Use this function for any questions related to getting historical stock data.
|
|
|
43 |
This function always returns a pandas DataFrame."""
|
44 |
return yf.download(tickers, start=start_date, end=end_date)
|
45 |
|
46 |
+
def tavily_search_tool(query: str) -> str:
|
47 |
"""Searches the web for a given query and returns an answer, "
|
48 |
ready for use as context in a RAG application, using the Tavily API.
|
49 |
Use this function for any questions requiring knowledge not available to the model.
|