Spaces:
Sleeping
Sleeping
Commit
·
c5a7712
1
Parent(s):
67e6563
Update app.py
Browse files
app.py
CHANGED
@@ -27,8 +27,10 @@ class OpenAIClient:
|
|
27 |
)
|
28 |
run = self.client.beta.threads.runs.create(thread_id=st.session_state.get("thread_id"), assistant_id=self.assistant_id).id
|
29 |
while run == "queued" or run == "in_progress":
|
30 |
-
|
31 |
-
|
|
|
|
|
32 |
|
33 |
|
34 |
def get_response(self):
|
|
|
27 |
)
|
28 |
run = self.client.beta.threads.runs.create(thread_id=st.session_state.get("thread_id"), assistant_id=self.assistant_id).id
|
29 |
while run == "queued" or run == "in_progress":
|
30 |
+
run = self.client.beta.threads.runs.retrieve(thread_id=st.session_state.get("thread_id"),run_id=run).status
|
31 |
+
if run == "completed":
|
32 |
+
return "Done"
|
33 |
+
time.sleep(0.5)
|
34 |
|
35 |
|
36 |
def get_response(self):
|