bstraehle commited on
Commit
06d9591
1 Parent(s): 217bc75

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py CHANGED
@@ -17,6 +17,27 @@ def chat(message, history):
17
  )
18
 
19
  show_json(assistant)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
  for i in range(len(message)):
22
  time.sleep(0.5)
 
17
  )
18
 
19
  show_json(assistant)
20
+
21
+ thread = client.beta.threads.create()
22
+
23
+ show_json(thread)
24
+
25
+ message = client.beta.threads.messages.create(
26
+ thread_id=thread.id,
27
+ role="user",
28
+ content="I need to solve the equation `3x + 11 = 14`. Can you help me?",
29
+ )
30
+
31
+ show_json(message)
32
+
33
+ run = client.beta.threads.runs.create(
34
+ thread_id=thread.id,
35
+ assistant_id=assistant.id,
36
+ )
37
+
38
+ show_json(run)
39
+
40
+ ###
41
 
42
  for i in range(len(message)):
43
  time.sleep(0.5)