Wauplin HF Staff commited on
Commit
5fc0b33
·
verified ·
1 Parent(s): d28f5fa

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. 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