bstraehle commited on
Commit
b577162
1 Parent(s): 244f050

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -53,24 +53,24 @@ def chat(message, history):
53
  print("### history")
54
  print(history_openai_format)
55
 
56
- messages = client.beta.threads.messages.create(
57
  thread_id=thread.id,
58
  role="user",
59
  content=message,
60
  )
61
 
62
- show_json("messages", messages)
63
 
64
- runs = client.beta.threads.runs.create(
65
  thread_id=thread.id,
66
  assistant_id=assistant.id,
67
  )
68
 
69
- show_json("runs", runs)
70
 
71
  run = wait_on_run(client, run, thread)
72
 
73
- show_json("runs", 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