Skip to content

Conversation

@apappascs
Copy link
Contributor

This commit introduces the reasoningEffort parameter to the OpenAI API integration, allowing control over the reasoning effort used by models like o1-mini.

Changes:

  • Adds reasoningEffort field to OpenAiApi.ChatCompletionRequest.
  • Adds reasoningEffort field and builder method to OpenAiChatOptions.

resolves #2153

@apappascs apappascs force-pushed the feat/openai-reasoning-effort branch from 2265516 to ccb37fe Compare February 4, 2025 09:20
This commit introduces the `reasoningEffort` parameter to the OpenAI API integration, allowing control over the reasoning effort used by models like `o1-mini`.

Changes:
- Adds `reasoningEffort` field to `OpenAiApi.ChatCompletionRequest`.
- Adds `reasoningEffort` field and builder method to `OpenAiChatOptions`.

Signed-off-by: Alexandros Pappas <[email protected]>

Signed-off-by: Alexandros Pappas <[email protected]>
@apappascs apappascs force-pushed the feat/openai-reasoning-effort branch from ccb37fe to 93535f9 Compare February 4, 2025 09:31
@ilayaperumalg ilayaperumalg self-assigned this Feb 4, 2025
@markpollack markpollack added this to the 1.0.0-M6 milestone Feb 4, 2025
* @param streamOptions The new stream options to use.
* @return A new {@link ChatCompletionRequest} with the specified stream options.
*/
public ChatCompletionRequest streamOptions(StreamOptions streamOptions) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add any new option as the last argument of the constructor to avoid breaking the existing constructor as this is a public constructor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ilayaperumalg . just moved it as the last one for all public constructors.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @apappascs for the quick turn around. Will get this reviewed shortly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI:
The parameter for reasoning effort is available only for use with the ‘full’ o1 model which is currently being rolled-out to Tier 5 users. So it really depends on the api-key tier Spring team has on the tests so that it can pass

source: https://community.openai.com/t/o1s-reasoning-effort-parameter/1062308

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the info. For now, I will disable the test as this is for a specific model. But, let's keep the test.

Signed-off-by: Alexandros Pappas <[email protected]>
@ilayaperumalg
Copy link
Member

Squashed, rebased, disabled the test (as discussed in the thread above) and merged as 35101e7

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

Successfully merging this pull request may close these issues.

Feature Request: Support "reasoning_effort" option in OpenAiChatOptions

3 participants