spring-ai
spring-ai copied to clipboard
[AzureOpenAiChatOptions] Unable to set all possible options when calling AzureOpenAiChatModel
Bug description
Consider the attributes that can be set through AzureOpenAiChatOptions:
- maxTokens
- temperature
- topP
- logitBias
- user
- n
- stop
- presencePenalty
- frequencyPenalty
- deploymentName
- responseFormat
- functionCallbacks
- functions
The AzureOpenAiChatOptions object is used in the AzureOpenAiChatModel to create the instance of ChatCompletionsOptions.
ChatCompletionsOptions has the following attributes:
- messages
- maxTokens
- temperature
- topP
- logitBias
- user
- n
- stop
- presencePenalty
- frequencyPenalty
- stream
- model
- functions
- functionCall
- functionCallConfig
- dataSources
- enhancements
- seed
- responseFormat
- tools
- toolChoice
- logprobs
- topLogprobs
In code it seems like there's no way to set options like logprobs, enhancements or seed.
Furthermore, in the method that should merge two ChatCompletionsOptions:
private ChatCompletionsOptions merge(ChatCompletionsOptions fromOptions, ChatCompletionsOptions toOptions)
such options are not taken into account
Expected behavior
I'm expecting the AzureOpenAiChatOptions to be aligned with the currently available options for Azure OpenAi