mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
Add header X-Accel-Buffering set to no for SSE stream requests (#1168)
This commit is contained in:
parent
21b2f6168e
commit
8e5ffc5a58
1 changed files with 1 additions and 0 deletions
|
@ -1482,6 +1482,7 @@ class ServerRequestHandler(http.server.SimpleHTTPRequestHandler):
|
||||||
async def handle_sse_stream(self, genparams, api_format):
|
async def handle_sse_stream(self, genparams, api_format):
|
||||||
global friendlymodelname, currfinishreason
|
global friendlymodelname, currfinishreason
|
||||||
self.send_response(200)
|
self.send_response(200)
|
||||||
|
self.send_header("X-Accel-Buffering", "no")
|
||||||
self.send_header("cache-control", "no-cache")
|
self.send_header("cache-control", "no-cache")
|
||||||
self.send_header("connection", "keep-alive")
|
self.send_header("connection", "keep-alive")
|
||||||
self.end_headers(content_type='text/event-stream')
|
self.end_headers(content_type='text/event-stream')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue