This build was committed by a bot.

This commit is contained in:
github-actions[bot]
2025-12-28 19:38:16 +00:00
parent b7db5bab87
commit 6471d78d70
3 changed files with 6 additions and 3 deletions

View File

@@ -136,7 +136,10 @@ async function streamLocal(body, onDelta, signal) {
for (const line of lines) {
if (line.startsWith("data: ")) {
const d = line.slice(6);
if (d === "[DONE]") return;
if (d === "[DONE]") {
onDelta("", true);
return;
}
try {
const j = JSON.parse(d);
const delta = j.choices?.[0]?.delta?.content || "";