-
Notifications
You must be signed in to change notification settings - Fork 8
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
Use int for CandidateCount #4
Comments
We can omit the use of pointers for this field, and make it look like:
|
I'm on it! Just need to fix some testing magic first. |
What is the meaning of a default value (0) on |
Depends on Backend. GoogleAI throws 400 error but VertexAI return 1 candidate response |
There should be consistent behavior for the user here, I think. We should be careful to distinguish between "not set" and "explicitly asked 0" -- the latter can result in an error, for example (*). Therefore pointers could definitely be useful here. (*) An error is always a good start, because it can be removed later and replaced by different behavior. If we start with different behavior, turning it into an error later is impossible if we want to retain backwards compatibility. |
How about using value type for |
CandidateCount is now value type. When CandidateCount is zero value, the SDK will overwrite the value to 1 |
It's very likely that users will hardcode the candidate count at a call site such as:
In Go, it's more idiomatic to rely on
int
especially when it's clear that you don't need 64-bits. If candidate count was an int, it feels more natural to write without having to cast toint64
:The text was updated successfully, but these errors were encountered: