xuqinyang commited on
Commit
c3afaf7
1 Parent(s): d311439

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +2 -2
model.py CHANGED
@@ -23,9 +23,9 @@ def run(message: str,
23
  result=""
24
  for i in chat_history:
25
  history.append({"role": "user", "content": i[0]})
26
- if len(i[1])>0:
27
- history.append({"role": "assistant", "content": i[1]})
28
  print(history)
 
29
  for response in llm.create_chat_completion(history,stream=True,max_tokens=-1,temperature=0.3,top_k=5,top_p=0.85,repeat_penalty=1.1):
30
  if "content" in response["choices"][0]["delta"]:
31
  result = result + response["choices"][0]["delta"]["content"]
 
23
  result=""
24
  for i in chat_history:
25
  history.append({"role": "user", "content": i[0]})
26
+ history.append({"role": "assistant", "content": i[1]})
 
27
  print(history)
28
+ history.append({"role": "user", "content": message})
29
  for response in llm.create_chat_completion(history,stream=True,max_tokens=-1,temperature=0.3,top_k=5,top_p=0.85,repeat_penalty=1.1):
30
  if "content" in response["choices"][0]["delta"]:
31
  result = result + response["choices"][0]["delta"]["content"]