mirror of
https://github.com/multipleof4/sune.git
synced 2026-01-13 16:17:55 +00:00
This build was committed by a bot.
This commit is contained in:
@@ -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 || "";
|
||||
Reference in New Issue
Block a user