-
Notifications
You must be signed in to change notification settings - Fork 209
Closed
Description
Seems it was copy-pasted from JustFinishedRefusal
by mistake
openai-go/streamaccumulator.go
Lines 55 to 64 in c0414f1
// JustFinishedRefusal retrieves the chat completion refusal when it is known to have just been completed. | |
// The content is "just completed" when the last added chunk no longer contains a content | |
// delta. If the content is just completed, the content is returned and the boolean is true. Otherwise, | |
// an empty string is returned and the boolean will be false. | |
func (acc *ChatCompletionAccumulator) JustFinishedContent() (content string, ok bool) { | |
if acc.justFinished.state == contentResponseState { | |
return acc.Choices[0].Message.Content, true | |
} | |
return "", false | |
} |
Metadata
Metadata
Assignees
Labels
No labels