Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,12 +26,8 @@ assistant, thread = None, None
|
|
26 |
|
27 |
def get_current_date():
|
28 |
"""Use to get the current date."""
|
29 |
-
print(datetime.now())
|
30 |
-
|
31 |
-
def search_engine(search_query):
|
32 |
-
"""Use to search the web."""
|
33 |
-
print("search_engine")
|
34 |
-
return "TODO"
|
35 |
|
36 |
def create_assistant(client):
|
37 |
assistant = client.beta.assistants.create(
|
@@ -154,7 +150,7 @@ def chat(message, history):
|
|
154 |
global client, assistant, thread
|
155 |
|
156 |
if assistant == None:
|
157 |
-
assistant =
|
158 |
|
159 |
if thread == None or len(history) == 0:
|
160 |
thread = create_thread(client)
|
|
|
26 |
|
27 |
def get_current_date():
|
28 |
"""Use to get the current date."""
|
29 |
+
print(f"Current date: {datetime.now()}")
|
30 |
+
return datetime.now()
|
|
|
|
|
|
|
|
|
31 |
|
32 |
def create_assistant(client):
|
33 |
assistant = client.beta.assistants.create(
|
|
|
150 |
global client, assistant, thread
|
151 |
|
152 |
if assistant == None:
|
153 |
+
assistant = create_assistant(client)
|
154 |
|
155 |
if thread == None or len(history) == 0:
|
156 |
thread = create_thread(client)
|