wannaphong commited on
Commit
df4d3cc
1 Parent(s): 7c77a73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -92,11 +92,8 @@ def respond(
92
  i=1
93
  if history!=[]:
94
  for msn in history:
95
- if i%2==0:
96
- messages.append({"role":"user","content":msn})
97
- else:
98
- messages.append({"role":"assistant","content":msn})
99
- i+=1
100
  messages+=chat
101
  print(messages)
102
  stream = llm.create_chat_completion(messages=messages,temperature = temperature,top_k = top_k,top_p = top_p,min_p = min_p,max_tokens = max_tokens,repeat_penalty = repeat_penalty,stream = True)
 
92
  i=1
93
  if history!=[]:
94
  for msn in history:
95
+ messages.append({"role":"user","content":msn[0]})
96
+ messages.append({"role":"assistant","content":msn[1]})
 
 
 
97
  messages+=chat
98
  print(messages)
99
  stream = llm.create_chat_completion(messages=messages,temperature = temperature,top_k = top_k,top_p = top_p,min_p = min_p,max_tokens = max_tokens,repeat_penalty = repeat_penalty,stream = True)