Skip to content

Commit 48cd657

Browse files
committed
refactor(plugins/compat-oai): clean up stream content handling
Remove unused conditional check and commented code in streaming logic.
1 parent d90a03e commit 48cd657

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

go/plugins/compat_oai/generate.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,7 @@ func (g *ModelGenerator) generateStream(ctx context.Context, handleChunk func(co
266266
modelChunk := &ai.ModelResponseChunk{}
267267

268268
// Handle content delta
269-
if _, ok := acc.JustFinishedContent(); ok {
270-
// modelChunk.Content = append(modelChunk.Content, ai.NewTextPart(content))
271-
} else if chunk.Choices[0].Delta.Content != "" {
269+
if chunk.Choices[0].Delta.Content != "" {
272270
modelChunk.Content = append(modelChunk.Content, ai.NewTextPart(chunk.Choices[0].Delta.Content))
273271
}
274272

0 commit comments

Comments
 (0)