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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -41,13 +41,15 @@ def extract_content_value(data):
41
 
42
  def chat(message, history):
43
  client, assistant, thread = init_assistant()
44
-
45
  history_openai_format = []
 
46
  for human, assistant in history:
47
- history_openai_format.append({"role": "user", "content": human })
48
  history_openai_format.append({"role": "assistant", "content":assistant})
49
- history_openai_format.append({"role": "user", "content": message})
50
 
 
 
51
  print("### history")
52
  print(history_openai_format)
53
 
 
41
 
42
  def chat(message, history):
43
  client, assistant, thread = init_assistant()
44
+
45
  history_openai_format = []
46
+
47
  for human, assistant in history:
48
+ history_openai_format.append({"role": "user", "content": human})
49
  history_openai_format.append({"role": "assistant", "content":assistant})
 
50
 
51
+ history_openai_format.append({"role": "user", "content": message})
52
+
53
  print("### history")
54
  print(history_openai_format)
55