Skip to content

Commit

Permalink
adjust streaming timings
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed Oct 8, 2023
1 parent e967717 commit 4e5b629
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions koboldcpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def bring_terminal_to_foreground():
modelbusy = threading.Lock()
requestsinqueue = 0
defaultport = 5001
KcppVersion = "1.46"
KcppVersion = "1.46.1"
showdebug = True
showsamplerwarning = True
showmaxctxwarning = True
Expand Down Expand Up @@ -540,8 +540,9 @@ async def handle_sse_stream(self, api_format):

# flush buffers, sleep a bit to make sure all data sent, and then force close the connection
self.wfile.flush()
await asyncio.sleep(0.1)
await asyncio.sleep(0.2)
self.close_connection = True
await asyncio.sleep(0.1)


async def handle_request(self, genparams, api_format, stream_flag):
Expand Down

0 comments on commit 4e5b629

Please sign in to comment.