mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-19 09:15:18 +02:00
fixed a race condition with SSE streaming
This commit is contained in:
+2
-1
@@ -365,7 +365,7 @@ maxhordelen = 256
|
||||
modelbusy = threading.Lock()
|
||||
requestsinqueue = 0
|
||||
defaultport = 5001
|
||||
KcppVersion = "1.47"
|
||||
KcppVersion = "1.47.1"
|
||||
showdebug = True
|
||||
showsamplerwarning = True
|
||||
showmaxctxwarning = True
|
||||
@@ -527,6 +527,7 @@ class ServerRequestHandler(http.server.SimpleHTTPRequestHandler):
|
||||
|
||||
current_token = 0
|
||||
incomplete_token_buffer = bytearray()
|
||||
await asyncio.sleep(0.1) #anti race condition, prevent check from overtaking generate
|
||||
while True:
|
||||
streamDone = handle.has_finished() #exit next loop on done
|
||||
tokenStr = ""
|
||||
|
||||
Reference in New Issue
Block a user