We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 779b3e4 commit 8c52580Copy full SHA for 8c52580
core/llm/llms/Gemini.ts
@@ -317,15 +317,6 @@ class Gemini extends BaseLLM {
317
let buffer = "";
318
for await (const chunk of stream) {
319
buffer += chunk;
320
- if (buffer.startsWith("[")) {
321
- buffer = buffer.slice(1);
322
- }
323
- if (buffer.endsWith("]")) {
324
- buffer = buffer.slice(0, -1);
325
326
- if (buffer.startsWith(",")) {
327
328
329
330
const parts = buffer.split("\n,");
331
@@ -415,7 +406,7 @@ class Gemini extends BaseLLM {
415
406
signal,
416
407
});
417
408
418
- for await (const chunk of streamSse(response)) {
409
+ for await (const chunk of this.processGeminiResponse(streamSse(response))) {
419
410
yield chunk;
420
411
}
421
412
0 commit comments