Skip to content

Commit 779b3e4

Browse files
committed
fix: use streamsse for streaming chat in gemini
1 parent 2041336 commit 779b3e4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

core/llm/llms/Gemini.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { streamResponse } from "@continuedev/fetch";
1+
import { streamSse } from "@continuedev/fetch";
22
import { v4 as uuidv4 } from "uuid";
33
import {
44
AssistantChatMessage,
@@ -414,10 +414,9 @@ class Gemini extends BaseLLM {
414414
body: JSON.stringify(body),
415415
signal,
416416
});
417-
for await (const message of this.processGeminiResponse(
418-
streamResponse(response),
419-
)) {
420-
yield message;
417+
418+
for await (const chunk of streamSse(response)) {
419+
yield chunk;
421420
}
422421
}
423422
private async *streamChatBison(

0 commit comments

Comments
 (0)