mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
parent
b984a44f47
commit
e5b756ecfe
@ -346,7 +346,7 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
|
|
||||||
# can't really truncate the system messages
|
# can't really truncate the system messages
|
||||||
system_msg = '\n'.join(system_msgs)
|
system_msg = '\n'.join(system_msgs)
|
||||||
if system_msg[-1] != '\n':
|
if system_msg and system_msg[-1] != '\n':
|
||||||
system_msg = system_msg + '\n'
|
system_msg = system_msg + '\n'
|
||||||
|
|
||||||
system_token_count = len(encode(system_msg)[0])
|
system_token_count = len(encode(system_msg)[0])
|
||||||
|
Loading…
Reference in New Issue
Block a user