mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
chat completions forced append stop sequences if already existing
This commit is contained in:
parent
df596aeef3
commit
d8fb97211f
1 changed files with 3 additions and 0 deletions
|
@ -744,6 +744,9 @@ class ServerRequestHandler(http.server.SimpleHTTPRequestHandler):
|
||||||
genparams["images"] = images_added
|
genparams["images"] = images_added
|
||||||
if len(genparams.get('stop_sequence', []))==0: #only set stop seq if it wont overwrite existing
|
if len(genparams.get('stop_sequence', []))==0: #only set stop seq if it wont overwrite existing
|
||||||
genparams["stop_sequence"] = [user_message_start.strip(),assistant_message_start.strip()]
|
genparams["stop_sequence"] = [user_message_start.strip(),assistant_message_start.strip()]
|
||||||
|
else:
|
||||||
|
genparams["stop_sequence"].append(user_message_start.strip())
|
||||||
|
genparams["stop_sequence"].append(assistant_message_start.strip())
|
||||||
genparams["trim_stop"] = True
|
genparams["trim_stop"] = True
|
||||||
|
|
||||||
elif api_format==5:
|
elif api_format==5:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue