File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/openai-adapters/src/apis Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import { AuthClient , GoogleAuth , JWT , auth } from "google-auth-library" ;
22
3- import { streamResponse , streamSse } from "@continuedev/fetch" ;
3+ import { streamSse } from "@continuedev/fetch" ;
44import { ChatMessage , CompletionOptions , LLMOptions } from "../../index.js" ;
55import { renderChatMessage , stripImages } from "../../util/messageContent.js" ;
66import { 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 (
Original file line number Diff line number Diff line change 1- import { streamResponse } from "@continuedev/fetch" ;
1+ import { streamSse } from "@continuedev/fetch" ;
22import { OpenAI } from "openai/index" ;
33import {
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," ) ;
You can’t perform that action at this time.
0 commit comments