Skip to content

Copy-paste docs error on ChatCompletionAccumulator.JustFinishedContent #397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
danthegoodman1 opened this issue May 16, 2025 · 1 comment

Comments

@danthegoodman1
Copy link

danthegoodman1 commented May 16, 2025

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
}

@jacobzim-stl
Copy link
Collaborator

Eek, thanks. Will fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants