]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server: do not remove whitespace at the start of a completion chunk (#7524)
authormgroeber9110 <redacted>
Tue, 28 May 2024 04:55:51 +0000 (06:55 +0200)
committerGitHub <redacted>
Tue, 28 May 2024 04:55:51 +0000 (14:55 +1000)
examples/server/public/index.html

index 095c4a929f9863a162d74faf1769510dda1e2ac8..4c5a34d903309528a491e801002d057503e230c5 100644 (file)
           message = html`<${Probabilities} data=${data} />`
         } else {
           const text = isArrayMessage ?
-            data.map(msg => msg.content).join('').replace(/^\s+/, '') :
+            data.map(msg => msg.content).join('') :
             data;
           message = isCompletionMode ?
             text :