Skip to content

Commit ea5a3e4

Browse files
feat: responses streaming added
1 parent 48c06ab commit ea5a3e4

File tree

25 files changed

+754
-431
lines changed

25 files changed

+754
-431
lines changed

core/providers/azure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ func (provider *AzureProvider) ChatCompletionStream(ctx context.Context, postHoo
369369
}
370370

371371
// Use shared streaming logic from OpenAI
372-
return handleOpenAIStreaming(
372+
return handleOpenAIChatCompletionStreaming(
373373
ctx,
374374
provider.streamClient,
375375
fullURL,

core/providers/cerebras.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (provider *CerebrasProvider) Embedding(ctx context.Context, key schemas.Key
136136
// Returns a channel containing BifrostResponse objects representing the stream or an error if the request fails.
137137
func (provider *CerebrasProvider) ChatCompletionStream(ctx context.Context, postHookRunner schemas.PostHookRunner, key schemas.Key, request *schemas.BifrostChatRequest) (chan *schemas.BifrostStream, *schemas.BifrostError) {
138138
// Use shared OpenAI-compatible streaming logic
139-
return handleOpenAIStreaming(
139+
return handleOpenAIChatCompletionStreaming(
140140
ctx,
141141
provider.streamClient,
142142
provider.networkConfig.BaseURL+"/v1/chat/completions",

core/providers/gemini.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (provider *GeminiProvider) ChatCompletionStream(ctx context.Context, postHo
177177
}
178178

179179
// Use shared OpenAI-compatible streaming logic
180-
return handleOpenAIStreaming(
180+
return handleOpenAIChatCompletionStreaming(
181181
ctx,
182182
provider.streamClient,
183183
provider.networkConfig.BaseURL+"/openai/chat/completions",

core/providers/groq.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func (provider *GroqProvider) Embedding(ctx context.Context, key schemas.Key, re
176176
// Returns a channel containing BifrostResponse objects representing the stream or an error if the request fails.
177177
func (provider *GroqProvider) ChatCompletionStream(ctx context.Context, postHookRunner schemas.PostHookRunner, key schemas.Key, request *schemas.BifrostChatRequest) (chan *schemas.BifrostStream, *schemas.BifrostError) {
178178
// Use shared OpenAI-compatible streaming logic
179-
return handleOpenAIStreaming(
179+
return handleOpenAIChatCompletionStreaming(
180180
ctx,
181181
provider.streamClient,
182182
provider.networkConfig.BaseURL+"/v1/chat/completions",

core/providers/mistral.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func (provider *MistralProvider) Embedding(ctx context.Context, key schemas.Key,
130130
// Returns a channel containing BifrostResponse objects representing the stream or an error if the request fails.
131131
func (provider *MistralProvider) ChatCompletionStream(ctx context.Context, postHookRunner schemas.PostHookRunner, key schemas.Key, request *schemas.BifrostChatRequest) (chan *schemas.BifrostStream, *schemas.BifrostError) {
132132
// Use shared OpenAI-compatible streaming logic
133-
return handleOpenAIStreaming(
133+
return handleOpenAIChatCompletionStreaming(
134134
ctx,
135135
provider.streamClient,
136136
provider.networkConfig.BaseURL+"/v1/chat/completions",

core/providers/ollama.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func (provider *OllamaProvider) Embedding(ctx context.Context, key schemas.Key,
149149
// Returns a channel containing BifrostResponse objects representing the stream or an error if the request fails.
150150
func (provider *OllamaProvider) ChatCompletionStream(ctx context.Context, postHookRunner schemas.PostHookRunner, key schemas.Key, request *schemas.BifrostChatRequest) (chan *schemas.BifrostStream, *schemas.BifrostError) {
151151
// Use shared OpenAI-compatible streaming logic
152-
return handleOpenAIStreaming(
152+
return handleOpenAIChatCompletionStreaming(
153153
ctx,
154154
provider.streamClient,
155155
provider.networkConfig.BaseURL+"/v1/chat/completions",

0 commit comments

Comments
 (0)