diff options
| author | Michael Peter Christen <mc@yacy.net> | 2025-11-30 22:02:42 +0100 |
|---|---|---|
| committer | Michael Peter Christen <mc@yacy.net> | 2025-11-30 22:02:42 +0100 |
| commit | 1202f74790458206e6276fab7d67f1f0b53f9362 (patch) | |
| tree | 326e8cf7415c5d95dd473e2383cf670e2f374e03 /source | |
| parent | a8246c50c890dee09050e9afa7c7364a056cf250 (diff) | |
fixed missing line ending in token streaming
Diffstat (limited to 'source')
| -rw-r--r-- | source/net/yacy/http/servlets/RAGProxyServlet.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/net/yacy/http/servlets/RAGProxyServlet.java b/source/net/yacy/http/servlets/RAGProxyServlet.java index 0f37915e6..f45d3b7c1 100644 --- a/source/net/yacy/http/servlets/RAGProxyServlet.java +++ b/source/net/yacy/http/servlets/RAGProxyServlet.java @@ -207,6 +207,8 @@ public class RAGProxyServlet extends HttpServlet { in.close(); inputQueue.put(POISON); } catch (IOException | InterruptedException e) { + } finally { + try {inputQueue.put(POISON);} catch (InterruptedException e) {} } }); readerThread.start(); @@ -226,7 +228,7 @@ public class RAGProxyServlet extends HttpServlet { inputLine = inputLine.substring(0, p) + j.toString(); } } - out.print(inputLine); // i.e. data: {"id":"chatcmpl-69","object":"chat.completion.chunk","created":1715908287,"model":"llama3:8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"role":"assistant","content":"ߘ"},"finish_reason":null}]} + out.println(inputLine); // i.e. data: {"id":"chatcmpl-69","object":"chat.completion.chunk","created":1715908287,"model":"llama3:8b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"role":"assistant","content":"ߘ"},"finish_reason":null}]} out.flush(); count++; } |
