bstraehle commited on
Commit
0ee3feb
1 Parent(s): 8153096

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
26
 
27
  assistant, thread = None, None
28
 
29
- def today_tool(text: str) -> str:
30
  """Returns today's date. Use this function for any questions related to knowing today's date.
31
  There is no input. This function always returns today's date."""
32
  return str(date.today())
@@ -217,7 +217,7 @@ def chat(message, history):
217
  global client, assistant, thread
218
 
219
  if assistant == None:
220
- assistant = load_assistant(client)
221
 
222
  if thread == None or len(history) == 0:
223
  thread = create_thread(client)
 
26
 
27
  assistant, thread = None, None
28
 
29
+ def today_tool() -> date:
30
  """Returns today's date. Use this function for any questions related to knowing today's date.
31
  There is no input. This function always returns today's date."""
32
  return str(date.today())
 
217
  global client, assistant, thread
218
 
219
  if assistant == None:
220
+ assistant = create_assistant(client)
221
 
222
  if thread == None or len(history) == 0:
223
  thread = create_thread(client)