Class AzureOpenAiChatOptions
java.lang.Object
org.springframework.ai.azure.openai.AzureOpenAiChatOptions
- All Implemented Interfaces:
ChatOptions,ModelOptions,ToolCallingChatOptions
The configuration information for a chat completions request. Completions support a
wide variety of tasks and generate text that continues from or "completes" provided
prompt data.
- Author:
- Christian Tzolov, Thomas Vitale, Soby Chacko, Ilayaperumal Gopinathan, Alexandros Pappas, Andres da Silva Santos
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.springframework.ai.model.tool.ToolCallingChatOptions
DEFAULT_TOOL_EXECUTION_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()A builder to create a newToolCallingChatOptionsinstance.copy()Returns a copy of thisChatOptions.booleanstatic AzureOpenAiChatOptionsfromOptions(AzureOpenAiChatOptions fromOptions) com.azure.ai.openai.models.AzureChatEnhancementConfigurationReturns the frequency penalty to use for the chat.Whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.Returns the maximum number of tokens to use for the chat.getModel()Returns the model to use for the chat.getN()Returns the presence penalty to use for the chat.getSeed()getStop()Returns the stop sequences to use for the chat.com.azure.ai.openai.models.ChatCompletionStreamOptionsReturns the temperature to use for the chat.ToolCallbacks to be registered with the ChatModel.Get the configured tool context.Names of the tools to register with the ChatModel.getTopK()Returns the top K to use for the chat.getTopP()Returns the top P to use for the chat.getUser()inthashCode()voidsetDeploymentName(String deploymentName) voidsetEnhancements(com.azure.ai.openai.models.AzureChatEnhancementConfiguration enhancements) voidsetFrequencyPenalty(Double frequencyPenalty) voidsetFunctions(Set<String> functions) voidsetInternalToolExecutionEnabled(Boolean internalToolExecutionEnabled) Set whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.voidsetLogitBias(Map<String, Integer> logitBias) voidsetLogprobs(Boolean logprobs) voidsetMaxTokens(Integer maxTokens) voidvoidvoidsetPresencePenalty(Double presencePenalty) voidsetReasoningEffort(String reasoningEffort) voidsetResponseFormat(AzureOpenAiResponseFormat responseFormat) voidvoidvoidsetStopSequences(List<String> stopSequences) voidsetStreamOptions(com.azure.ai.openai.models.ChatCompletionStreamOptions streamOptions) voidsetStreamUsage(Boolean enableStreamUsage) voidsetTemperature(Double temperature) voidsetToolCallbacks(List<ToolCallback> toolCallbacks) Set the ToolCallbacks to be registered with the ChatModel.voidsetToolContext(Map<String, Object> toolContext) Set the tool context values as map.voidsetToolNames(Set<String> toolNames) Set the names of the tools to register with the ChatModel.voidsetTopLogProbs(Integer topLogProbs) voidvoid
-
Constructor Details
-
AzureOpenAiChatOptions
public AzureOpenAiChatOptions()
-
-
Method Details
-
getToolCallbacks
Description copied from interface:ToolCallingChatOptionsToolCallbacks to be registered with the ChatModel.- Specified by:
getToolCallbacksin interfaceToolCallingChatOptions
-
setToolCallbacks
Description copied from interface:ToolCallingChatOptionsSet the ToolCallbacks to be registered with the ChatModel.- Specified by:
setToolCallbacksin interfaceToolCallingChatOptions
-
getToolNames
Description copied from interface:ToolCallingChatOptionsNames of the tools to register with the ChatModel.- Specified by:
getToolNamesin interfaceToolCallingChatOptions
-
setToolNames
Description copied from interface:ToolCallingChatOptionsSet the names of the tools to register with the ChatModel.- Specified by:
setToolNamesin interfaceToolCallingChatOptions
-
getInternalToolExecutionEnabled
Description copied from interface:ToolCallingChatOptionsWhether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.- Specified by:
getInternalToolExecutionEnabledin interfaceToolCallingChatOptions
-
setInternalToolExecutionEnabled
Description copied from interface:ToolCallingChatOptionsSet whether theChatModelis responsible for executing the tools requested by the model or if the tools should be executed directly by the caller.- Specified by:
setInternalToolExecutionEnabledin interfaceToolCallingChatOptions
-
builder
Description copied from interface:ToolCallingChatOptionsA builder to create a newToolCallingChatOptionsinstance.- Returns:
- Returns a new
ChatOptions.Builder.
-
fromOptions
-
getMaxTokens
Description copied from interface:ChatOptionsReturns the maximum number of tokens to use for the chat.- Specified by:
getMaxTokensin interfaceChatOptions- Returns:
- the maximum number of tokens to use for the chat
-
setMaxTokens
-
getLogitBias
-
setLogitBias
-
getUser
-
setUser
-
getN
-
setN
-
getStopSequences
Description copied from interface:ChatOptionsReturns the stop sequences to use for the chat.- Specified by:
getStopSequencesin interfaceChatOptions- Returns:
- the stop sequences to use for the chat
-
setStopSequences
-
getStop
-
setStop
-
getPresencePenalty
Description copied from interface:ChatOptionsReturns the presence penalty to use for the chat.- Specified by:
getPresencePenaltyin interfaceChatOptions- Returns:
- the presence penalty to use for the chat
-
setPresencePenalty
-
getFrequencyPenalty
Description copied from interface:ChatOptionsReturns the frequency penalty to use for the chat.- Specified by:
getFrequencyPenaltyin interfaceChatOptions- Returns:
- the frequency penalty to use for the chat
-
setFrequencyPenalty
-
getModel
Description copied from interface:ChatOptionsReturns the model to use for the chat.- Specified by:
getModelin interfaceChatOptions- Returns:
- the model to use for the chat
-
setModel
-
getDeploymentName
-
setDeploymentName
-
getTemperature
Description copied from interface:ChatOptionsReturns the temperature to use for the chat.- Specified by:
getTemperaturein interfaceChatOptions- Returns:
- the temperature to use for the chat
-
setTemperature
-
getTopP
Description copied from interface:ChatOptionsReturns the top P to use for the chat.- Specified by:
getTopPin interfaceChatOptions- Returns:
- the top P to use for the chat
-
setTopP
-
setFunctions
-
getResponseFormat
-
setResponseFormat
-
getStreamUsage
-
setStreamUsage
-
getReasoningEffort
-
setReasoningEffort
-
getTopK
Description copied from interface:ChatOptionsReturns the top K to use for the chat.- Specified by:
getTopKin interfaceChatOptions- Returns:
- the top K to use for the chat
-
getSeed
-
setSeed
-
isLogprobs
-
setLogprobs
-
getTopLogProbs
-
setTopLogProbs
-
getEnhancements
public com.azure.ai.openai.models.AzureChatEnhancementConfiguration getEnhancements() -
setEnhancements
public void setEnhancements(com.azure.ai.openai.models.AzureChatEnhancementConfiguration enhancements) -
getToolContext
Description copied from interface:ToolCallingChatOptionsGet the configured tool context.- Specified by:
getToolContextin interfaceToolCallingChatOptions- Returns:
- the tool context map.
-
setToolContext
Description copied from interface:ToolCallingChatOptionsSet the tool context values as map.- Specified by:
setToolContextin interfaceToolCallingChatOptions- Parameters:
toolContext- as map
-
getStreamOptions
public com.azure.ai.openai.models.ChatCompletionStreamOptions getStreamOptions() -
setStreamOptions
public void setStreamOptions(com.azure.ai.openai.models.ChatCompletionStreamOptions streamOptions) -
copy
Description copied from interface:ChatOptionsReturns a copy of thisChatOptions.- Specified by:
copyin interfaceChatOptions- Returns:
- a copy of this
ChatOptions
-
equals
-
hashCode
public int hashCode()
-