Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def init_client():
|
|
21 |
#show_json("assistant", _assistant)
|
22 |
|
23 |
_thread = _client.beta.threads.create()
|
24 |
-
|
25 |
|
26 |
def wait_on_run(run):
|
27 |
global _client, _thread
|
@@ -57,13 +57,13 @@ def chat(message, history):
|
|
57 |
thread_id=_thread.id,
|
58 |
content=message,
|
59 |
)
|
60 |
-
show_json("message", message)
|
61 |
|
62 |
run = _client.beta.threads.runs.create(
|
63 |
assistant_id=_assistant.id,
|
64 |
thread_id=_thread.id,
|
65 |
)
|
66 |
-
show_json("run", run)
|
67 |
|
68 |
run = wait_on_run(run)
|
69 |
|
|
|
21 |
#show_json("assistant", _assistant)
|
22 |
|
23 |
_thread = _client.beta.threads.create()
|
24 |
+
show_json("thread", _thread)
|
25 |
|
26 |
def wait_on_run(run):
|
27 |
global _client, _thread
|
|
|
57 |
thread_id=_thread.id,
|
58 |
content=message,
|
59 |
)
|
60 |
+
#show_json("message", message)
|
61 |
|
62 |
run = _client.beta.threads.runs.create(
|
63 |
assistant_id=_assistant.id,
|
64 |
thread_id=_thread.id,
|
65 |
)
|
66 |
+
#show_json("run", run)
|
67 |
|
68 |
run = wait_on_run(run)
|
69 |
|