Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -77,7 +77,7 @@ def create_message(client, thread, msg):
|
|
| 77 |
content=msg,
|
| 78 |
)
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
return message
|
| 83 |
|
|
@@ -191,7 +191,18 @@ def chat(message, history):
|
|
| 191 |
|
| 192 |
run_steps = get_run_steps(client, thread, run)
|
| 193 |
|
| 194 |
-
get_run_step_details(run_steps)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
messages = get_messages(client, thread)
|
| 197 |
|
|
|
|
| 77 |
content=msg,
|
| 78 |
)
|
| 79 |
|
| 80 |
+
show_json("message", message)
|
| 81 |
|
| 82 |
return message
|
| 83 |
|
|
|
|
| 191 |
|
| 192 |
run_steps = get_run_steps(client, thread, run)
|
| 193 |
|
| 194 |
+
results = get_run_step_details(run_steps)
|
| 195 |
+
|
| 196 |
+
###
|
| 197 |
+
if len(results) > 0 :
|
| 198 |
+
print("## results[0]")
|
| 199 |
+
print(results[0])
|
| 200 |
+
create_message(client, thread, results[0] + " " + message)
|
| 201 |
+
run = create_run(client, assistant, thread)
|
| 202 |
+
run = wait_on_run(client, thread, run)
|
| 203 |
+
run_steps = get_run_steps(client, thread, run)
|
| 204 |
+
results = get_run_step_details(run_steps)
|
| 205 |
+
###
|
| 206 |
|
| 207 |
messages = get_messages(client, thread)
|
| 208 |
|