Class AzureOpenAiChatOptions.Builder
java.lang.Object
org.springframework.ai.azure.openai.AzureOpenAiChatOptions.Builder
- Enclosing class:
- AzureOpenAiChatOptions
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()deploymentName(String deploymentName) enhancements(com.azure.ai.openai.models.AzureChatEnhancementConfiguration enhancements) frequencyPenalty(Double frequencyPenalty) internalToolExecutionEnabled(Boolean internalToolExecutionEnabled) maxCompletionTokens(Integer maxCompletionTokens) Sets an upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.Sets the maximum number of tokens to generate in the chat completion.presencePenalty(Double presencePenalty) reasoningEffort(String reasoningEffort) responseFormat(AzureOpenAiResponseFormat responseFormat) streamOptions(com.azure.ai.openai.models.ChatCompletionStreamOptions streamOptions) streamUsage(Boolean enableStreamUsage) temperature(Double temperature) toolCallbacks(List<ToolCallback> toolCallbacks) toolCallbacks(ToolCallback... toolCallbacks) toolContext(Map<String, Object> toolContext) topLogprobs(Integer topLogprobs)
-
Field Details
-
options
-
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
deploymentName
-
frequencyPenalty
-
logitBias
-
maxTokens
Sets the maximum number of tokens to generate in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length.Model-specific usage:
- Use for non-reasoning models (e.g., gpt-4o, gpt-3.5-turbo)
- Cannot be used with reasoning models (e.g., o1, o3, o4-mini series)
Mutual exclusivity: This parameter cannot be used together with
maxCompletionTokens(Integer). If both are set, the last one set will be used and the other will be cleared with a warning.- Parameters:
maxTokens- the maximum number of tokens to generate, or null to unset- Returns:
- this builder instance
-
maxCompletionTokens
Sets an upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.Model-specific usage:
- Required for reasoning models (e.g., o1, o3, o4-mini series)
- Cannot be used with non-reasoning models (e.g., gpt-4o, gpt-3.5-turbo)
Mutual exclusivity: This parameter cannot be used together with
maxTokens(Integer). If both are set, the last one set will be used and the other will be cleared with a warning.- Parameters:
maxCompletionTokens- the maximum number of completion tokens to generate, or null to unset- Returns:
- this builder instance
-
N
-
presencePenalty
-
stop
-
temperature
-
topP
-
user
-
responseFormat
-
streamUsage
-
reasoningEffort
-
seed
-
logprobs
-
topLogprobs
-
enhancements
public AzureOpenAiChatOptions.Builder enhancements(com.azure.ai.openai.models.AzureChatEnhancementConfiguration enhancements) -
toolContext
-
streamOptions
public AzureOpenAiChatOptions.Builder streamOptions(com.azure.ai.openai.models.ChatCompletionStreamOptions streamOptions) -
toolCallbacks
-
toolCallbacks
-
toolNames
-
toolNames
-
internalToolExecutionEnabled
public AzureOpenAiChatOptions.Builder internalToolExecutionEnabled(@Nullable Boolean internalToolExecutionEnabled) -
build
-