fix: use streamsse for streaming chat in gemini

This commit is contained in:
uinstinct 2025-10-16 10:47:05 +05:30
parent 2041336eaf
commit 779b3e4c1c

View file

@ -1,4 +1,4 @@
import { streamResponse } from "@continuedev/fetch";
import { streamSse } from "@continuedev/fetch";
import { v4 as uuidv4 } from "uuid";
import {
AssistantChatMessage,
@ -414,10 +414,9 @@ class Gemini extends BaseLLM {
body: JSON.stringify(body),
signal,
});
for await (const message of this.processGeminiResponse(
streamResponse(response),
)) {
yield message;
for await (const chunk of streamSse(response)) {
yield chunk;
}
}
private async *streamChatBison(