Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def today_tool() -> str:
|
|
34 |
return str(date.today())
|
35 |
|
36 |
def yf_download_tool(tickers: List[str], start_date: date, end_date: date) -> pd.DataFrame:
|
37 |
-
"""Returns historical stock data for a given
|
38 |
using the yfinance library download function.
|
39 |
Use this function for any questions related to getting historical stock data.
|
40 |
The input should be the tickers as a List of strings, a start date, and an end date.
|
@@ -224,9 +224,9 @@ def chat(message, history):
|
|
224 |
global assistant, thread
|
225 |
|
226 |
if assistant == None:
|
227 |
-
|
228 |
# see https://platform.openai.com/playground/assistants
|
229 |
-
assistant = load_assistant(client) # on subsequent runs, load assistant
|
230 |
|
231 |
if thread == None or len(history) == 0:
|
232 |
thread = create_thread(client)
|
|
|
34 |
return str(date.today())
|
35 |
|
36 |
def yf_download_tool(tickers: List[str], start_date: date, end_date: date) -> pd.DataFrame:
|
37 |
+
"""Returns historical stock data for a list of given tickers from start date to end date
|
38 |
using the yfinance library download function.
|
39 |
Use this function for any questions related to getting historical stock data.
|
40 |
The input should be the tickers as a List of strings, a start date, and an end date.
|
|
|
224 |
global assistant, thread
|
225 |
|
226 |
if assistant == None:
|
227 |
+
assistant = create_assistant(client) # on first run, create assistant and update assistant_id
|
228 |
# see https://platform.openai.com/playground/assistants
|
229 |
+
#assistant = load_assistant(client) # on subsequent runs, load assistant
|
230 |
|
231 |
if thread == None or len(history) == 0:
|
232 |
thread = create_thread(client)
|