From 39f8cbd1f3d0df8b10e9743f28ef495b4a300906 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Tue, 13 Feb 2024 23:39:00 +0800 Subject: [PATCH] send done for textcompletions too --- koboldcpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koboldcpp.py b/koboldcpp.py index 173d78bf4..e10641e25 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -691,7 +691,7 @@ class ServerRequestHandler(http.server.SimpleHTTPRequestHandler): await asyncio.sleep(0.02) #this should keep things responsive if streamDone: - if api_format == 4: # if oai chat, send last [DONE] message consistent with openai format + if api_format == 4 or api_format == 3: # if oai chat, send last [DONE] message consistent with openai format await self.send_oai_sse_event('[DONE]') break except Exception as ex: