Spaces:
Running
Running
Update app.py
Browse files
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(
|
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 =
|
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)
|