Skip to content
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

TODO: Determine if it makes sense to have a negative int32 for maxTokens and what a real maximum is #3

Open
maxnystrom opened this issue Apr 14, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@maxnystrom
Copy link
Owner

For the initial release, my instinct was that it didn't make sense to have a maximum number of tokens returned to be negative. Likewise, since the value for the key is defined as int32 in the documentation, I left the maximum as the true maximum value. Not sure if this makes sense either.

The task here is to set real bounds on the maxTokens value.

if maxTokens < 1 {
return CompletionsResponse{}, fmt.Errorf("maxTokens must be greater than 0 and less than 2147483647") // Not sure it makes sense to have negative tokens?
}

@maxnystrom maxnystrom added enhancement New feature or request good first issue Good for newcomers question Further information is requested labels Apr 14, 2024
@maxnystrom maxnystrom self-assigned this Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant