wenjin272 commented on PR #1471: URL: https://github.com/apache/flink-agents/pull/1471#issuecomment-7259568518
> The typed Java constructors still take a primitive `double temperature`, in both `OpenAICompletionsSetup` and `OpenAIResponsesModelSetup` (the constructor and `createDescriptor`). So a Java caller who builds the setup that way can't leave temperature unset, while the descriptor path and the Python setup now can. Changing the four parameters to `Double` and adding the `temperature` argument only when it's non-null closes that. I applied that locally with a probe test that passes `null` through the Completions constructor: 97 OpenAI tests passed, and `getParameters()` had no `temperature` key. > > Without that change, on this head: 96 Java OpenAI tests and 113 Python OpenAI/vLLM tests passed. Since #1467 covers the temperature default, would you fold the constructor change into this PR? Thanks for catching this. Rather than changing `double` to `Double`, could we remove the non-descriptor constructors from both `OpenAICompletionsSetup` and `OpenAIResponsesModelSetup`, along with their private `createDescriptor()` helpers? The framework uses the `(ResourceDescriptor, ResourceContext)` constructor, and there are no in-repo callers of these overloads. Other integrations have similar constructors. Let's track their cleanup in a separate issue and keep this PR focused on the two OpenAI setups. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
