minor fix

This commit is contained in:
Concedo 2024-11-01 22:42:57 +08:00
parent bbebc76817
commit 2a07f2dc2c
2 changed files with 3 additions and 3 deletions

View file

@ -19254,7 +19254,7 @@ Current version indicated by LITEVER below.
</div>
<div class="settinglabel settingcell">
<div class="justifyleft settingsmall">DRY (If supported) <span class="helpicon">?<span class="helptext">An advanced multi-token repetition penalty. May not be available depending on backend, not supported on Horde.</span></span></div>
<div class="justifyleft settingsmall">DRY (If supported) <span class="helpicon">?<span class="helptext">An advanced multi-token repetition penalty. Range controlled by Rep-Pen Range. May not be available depending on backend, not supported on Horde.</span></span></div>
<div id="drysupporteddiv">
<div style="display:flex">
<div class="settinglabel settingcell">

View file

@ -1084,7 +1084,7 @@ def generate(genparams, is_quiet=False, stream_flag=False):
if pendingabortkey!="" and pendingabortkey==genkey:
print(f"\nDeferred Abort for GenKey: {pendingabortkey}")
pendingabortkey = ""
return {"text":"","status":-1,"stopreason":-1, "prompt_tokens":0, "completion_tokens": 0}
return {"text":"","status":-1,"stopreason":-1, "prompt_tokens":0, "completion_tokens": 0, "total_tokens": 0}
else:
ret = handle.generate(inputs)
outstr = ""
@ -1502,7 +1502,7 @@ class ServerRequestHandler(http.server.SimpleHTTPRequestHandler):
return generate(genparams=genparams,is_quiet=is_quiet,stream_flag=stream_flag)
genout = {"text": "", "status": -1, "stopreason": -1, "prompt_tokens":0, "completion_tokens": 0}
genout = {"text": "", "status": -1, "stopreason": -1, "prompt_tokens":0, "completion_tokens": 0, "total_tokens": 0}
if stream_flag:
loop = asyncio.get_event_loop()
executor = ThreadPoolExecutor()