winglian commited on
Commit
3a335b7
1 Parent(s): dfe6be1

fix for ZWSP

Browse files
Files changed (1) hide show
  1. tabbed.py +3 -0
tabbed.py CHANGED
@@ -35,6 +35,9 @@ def chat(history, system_message, max_tokens, temperature, top_p, top_k, repeat_
35
  "\n".join(["\n".join(["USER: "+item[0], "ASSISTANT: "+item[1]])
36
  for item in history])
37
 
 
 
 
38
  history[-1][1] = ""
39
  for output in llm(
40
  messages,
 
35
  "\n".join(["\n".join(["USER: "+item[0], "ASSISTANT: "+item[1]])
36
  for item in history])
37
 
38
+ # remove last space from assistant, some models output a ZWSP if you leave a space
39
+ messages = messages[:-1]
40
+
41
  history[-1][1] = ""
42
  for output in llm(
43
  messages,