server: do not remove whitespace at the start of a completion chunk

This commit is contained in:
mgroeber9110 2024-06-08 10:40:35 +02:00
parent ee459f40f6
commit 8be0d14c80

View file

@ -416,7 +416,7 @@
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 :