Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- src/routes/responses.ts +4 -0
src/routes/responses.ts
CHANGED
@@ -518,6 +518,10 @@ async function* handleOneTurnStream(
|
|
518 |
};
|
519 |
}
|
520 |
|
|
|
|
|
|
|
|
|
521 |
const delta = chunk.choices[0].delta as PatchedDeltaWithReasoning;
|
522 |
const reasoningText = delta.reasoning ?? delta.reasoning_content;
|
523 |
|
|
|
518 |
};
|
519 |
}
|
520 |
|
521 |
+
if (!chunk.choices[0]) {
|
522 |
+
continue;
|
523 |
+
}
|
524 |
+
|
525 |
const delta = chunk.choices[0].delta as PatchedDeltaWithReasoning;
|
526 |
const reasoningText = delta.reasoning ?? delta.reasoning_content;
|
527 |
|