Skip to content

Commit d90a03e

Browse files
高祖阳eric642
authored andcommitted
bugfix: stream
1 parent 7fad9af commit d90a03e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

go/plugins/compat_oai/generate.go

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

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

0 commit comments

Comments
 (0)