Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -53,24 +53,24 @@ def chat(message, history):
|
|
53 |
print("### history")
|
54 |
print(history_openai_format)
|
55 |
|
56 |
-
|
57 |
thread_id=thread.id,
|
58 |
role="user",
|
59 |
content=message,
|
60 |
)
|
61 |
|
62 |
-
show_json("
|
63 |
|
64 |
-
|
65 |
thread_id=thread.id,
|
66 |
assistant_id=assistant.id,
|
67 |
)
|
68 |
|
69 |
-
show_json("runs",
|
70 |
|
71 |
run = wait_on_run(client, run, thread)
|
72 |
|
73 |
-
show_json("runs",
|
74 |
|
75 |
messages = client.beta.threads.messages.list(thread_id=thread.id)
|
76 |
|
|
|
53 |
print("### history")
|
54 |
print(history_openai_format)
|
55 |
|
56 |
+
message = client.beta.threads.messages.create(
|
57 |
thread_id=thread.id,
|
58 |
role="user",
|
59 |
content=message,
|
60 |
)
|
61 |
|
62 |
+
show_json("message", message)
|
63 |
|
64 |
+
run = client.beta.threads.runs.create(
|
65 |
thread_id=thread.id,
|
66 |
assistant_id=assistant.id,
|
67 |
)
|
68 |
|
69 |
+
show_json("runs", run)
|
70 |
|
71 |
run = wait_on_run(client, run, thread)
|
72 |
|
73 |
+
show_json("runs", run)
|
74 |
|
75 |
messages = client.beta.threads.messages.list(thread_id=thread.id)
|
76 |
|