Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def init_client():
|
|
18 |
instructions="You are a personal math tutor. Answer questions briefly, in a sentence or less.",
|
19 |
model="gpt-4-1106-preview",
|
20 |
)
|
21 |
-
|
22 |
|
23 |
_thread = _client.beta.threads.create()
|
24 |
show_json("thread", _thread)
|
@@ -57,13 +57,13 @@ def chat(message, history):
|
|
57 |
thread_id=_thread.id,
|
58 |
content=message,
|
59 |
)
|
60 |
-
|
61 |
|
62 |
run = _client.beta.threads.runs.create(
|
63 |
assistant_id=_assistant.id,
|
64 |
thread_id=_thread.id,
|
65 |
)
|
66 |
-
|
67 |
|
68 |
run = wait_on_run(run)
|
69 |
|
|
|
18 |
instructions="You are a personal math tutor. Answer questions briefly, in a sentence or less.",
|
19 |
model="gpt-4-1106-preview",
|
20 |
)
|
21 |
+
show_json("assistant", _assistant)
|
22 |
|
23 |
_thread = _client.beta.threads.create()
|
24 |
show_json("thread", _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 |
|