Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -128,10 +128,8 @@ def chat(message, history):
|
|
128 |
|
129 |
if assistant == None:
|
130 |
assistant = load_assistant(client)
|
131 |
-
|
132 |
-
print(history)
|
133 |
|
134 |
-
if len(history) == 0:
|
135 |
thread = create_thread(client)
|
136 |
|
137 |
create_message(client, thread, message)
|
|
|
128 |
|
129 |
if assistant == None:
|
130 |
assistant = load_assistant(client)
|
|
|
|
|
131 |
|
132 |
+
if thread == None or len(history) == 0:
|
133 |
thread = create_thread(client)
|
134 |
|
135 |
create_message(client, thread, message)
|