feat: Add reasoning effort control for GPT-5 (o1 series) to AzureOpenAi properties#147
feat: Add reasoning effort control for GPT-5 (o1 series) to AzureOpenAi properties#147caio-carne1ro wants to merge 6 commits intolangchain4j:mainfrom
Conversation
| String nonAzureApiKey, | ||
| Set<Capability> supportedCapabilities | ||
| Set<Capability> supportedCapabilities, | ||
| ReasoningEffortValue reasoningEffort |
There was a problem hiding this comment.
This does not work:
Caused by: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [com.azure.ai.openai.models.ReasoningEffortValue]
There was a problem hiding this comment.
As suggested, I adjusted the property to string to fix this exception
|
@dliubarskyi Or should I leave it as a String for now and use a converter to ReasoningEffortValue and validate if the value is valid? |
|
I would just accept |
Issue
Closes #4051
Change
Add support for the ReasoningEffortValue parameter in the AzureOpenAiChatModel class. This enhancement would:
Extend the AzureOpenAiChatModel.Builder to accept a reasoningEffort parameter
Store the reasoningEffort value in the model configuration
Pass the reasoningEffort value to the ChatCompletionsOptions when making API calls
Allow users to specify reasoning effort levels (LOW, MEDIUM, HIGH) for GPT-5 models
This would enable full compatibility with GPT-5 (o1 series) models and provide users with control over the reasoning compute effort.
General checklist
Checklist for adding new Spring Boot starter
pom.xmlorg.springframework.boot.autoconfigure.AutoConfiguration.importsfile in thelangchain4j-{integration}-spring-boot-starter/src/main/resources/META-INF/spring/directory