Seems it was copy-pasted from JustFinishedRefusal by mistake
|
// 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 |
|
} |
Seems it was copy-pasted from
JustFinishedRefusalby mistakeopenai-go/streamaccumulator.go
Lines 55 to 64 in c0414f1