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

temperature and topP for Options should be Double, not Float #935

Open
jottinger opened this issue Jun 23, 2024 · 2 comments
Open

temperature and topP for Options should be Double, not Float #935

jottinger opened this issue Jun 23, 2024 · 2 comments
Labels
configuration enhancement New feature or request

Comments

@jottinger
Copy link

Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.

Expected Behavior

var options=OpenAiChatOptions.builder()
    .withModel("gpt-4o")
    .withTemperature(1.0)
    .build();

Current Behavior

Right now, you have to specify the value as being specifically a float, as javac won't coerce a double to a Float, for use with both temperature and topP. However, in the serialized form being sent to the LLMs, the granularity and format aren't different; the options object is slightly larger with the use of Double instead of Float but that's unlikely to be significant, and it's less confusing for programmers to use the natural syntax for doubles over the syntax for floats. The following code is what one has to do now, if one sets the temperature, for example:

var options=OpenAiChatOptions.builder()
    .withModel("gpt-4o")
    .withTemperature(1.0f)
    .build();

Context

It hasn't really affected me - I mean, I guess I have to type that f or use a Float reference instead, oh the humanity, etc.. but I think it's a relatively appropriate change for quality of life for users of the APIs, and the impact for current users would be minimal since it's a widening operation and not a narrowing one.

@csterwa csterwa added configuration enhancement New feature or request labels Sep 4, 2024
@ThomasVitale
Copy link
Contributor

Duplicate of #712

@ThomasVitale
Copy link
Contributor

This was solved in #712. The issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants