bstraehle commited on
Commit
1ec4b78
1 Parent(s): 7fd13ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -46,9 +46,6 @@ def chat(message, history):
46
  global client
47
  global assistant
48
  global thread
49
-
50
- if len(history_openai_format) > 1:
51
- client, assistant, thread = init_assistant()
52
 
53
  history_openai_format = []
54
 
@@ -57,6 +54,9 @@ def chat(message, history):
57
  history_openai_format.append({"role": "assistant", "content":assistant})
58
 
59
  history_openai_format.append({"role": "user", "content": message})
 
 
 
60
 
61
  print("### history")
62
  print(len(history_openai_format))
 
46
  global client
47
  global assistant
48
  global thread
 
 
 
49
 
50
  history_openai_format = []
51
 
 
54
  history_openai_format.append({"role": "assistant", "content":assistant})
55
 
56
  history_openai_format.append({"role": "user", "content": message})
57
+
58
+ if len(history_openai_format) > 1:
59
+ client, assistant, thread = init_assistant()
60
 
61
  print("### history")
62
  print(len(history_openai_format))