Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def show_json(obj):
|
|
24 |
print(json.loads(obj.model_dump_json()))
|
25 |
print("###")
|
26 |
|
27 |
-
def wait_on_run(run, thread):
|
28 |
while run.status == "queued" or run.status == "in_progress":
|
29 |
run = client.beta.threads.runs.retrieve(
|
30 |
thread_id=thread.id,
|
@@ -75,7 +75,7 @@ def chat(message, history):
|
|
75 |
|
76 |
show_json(run)
|
77 |
|
78 |
-
run = wait_on_run(run, thread)
|
79 |
|
80 |
show_json(run)
|
81 |
|
|
|
24 |
print(json.loads(obj.model_dump_json()))
|
25 |
print("###")
|
26 |
|
27 |
+
def wait_on_run(client, run, thread):
|
28 |
while run.status == "queued" or run.status == "in_progress":
|
29 |
run = client.beta.threads.runs.retrieve(
|
30 |
thread_id=thread.id,
|
|
|
75 |
|
76 |
show_json(run)
|
77 |
|
78 |
+
run = wait_on_run(client, run, thread)
|
79 |
|
80 |
show_json(run)
|
81 |
|