Skip to content

Commit f72199d

Browse files
committed
use streamsse in vertexai
1 parent 31c7383 commit f72199d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/llm/llms/VertexAI.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AuthClient, GoogleAuth, JWT, auth } from "google-auth-library";
22

3-
import { streamResponse, streamSse } from "@continuedev/fetch";
3+
import { streamSse } from "@continuedev/fetch";
44
import { ChatMessage, CompletionOptions, LLMOptions } from "../../index.js";
55
import { renderChatMessage, stripImages } from "../../util/messageContent.js";
66
import { BaseLLM } from "../index.js";
@@ -287,7 +287,7 @@ class VertexAI extends BaseLLM {
287287
body: JSON.stringify(body),
288288
signal,
289289
});
290-
yield* this.geminiInstance.processGeminiResponse(streamResponse(response));
290+
yield* this.geminiInstance.processGeminiResponse(streamSse(response));
291291
}
292292

293293
private async *streamChatBison(

packages/openai-adapters/src/apis/Gemini.ts

Lines changed: 2 additions & 2 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 { OpenAI } from "openai/index";
33
import {
44
ChatCompletion,
@@ -286,7 +286,7 @@ export class GeminiApi implements BaseLlmApi {
286286
async *handleStreamResponse(response: any, model: string) {
287287
let buffer = "";
288288
let usage: UsageInfo | undefined = undefined;
289-
for await (const chunk of streamResponse(response as any)) {
289+
for await (const chunk of streamSse(response as any)) {
290290
buffer += chunk;
291291

292292
const parts = buffer.split("\n,");

0 commit comments

Comments
 (0)