Package org.springframework.ai.openai
Class OpenAiChatOptions
java.lang.Object
org.springframework.ai.openai.OpenAiChatOptions
- All Implemented Interfaces:
ChatOptions,FunctionCallingOptions,ModelOptions,ToolCallingChatOptions
Options for the OpenAI Chat API.
- Since:
- 0.8.0
- Author:
- Christian Tzolov, Mariusz Bernacki, Thomas Vitale, Ilayaperumal Gopinathan
-
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 TypeMethodDescriptionstatic OpenAiChatOptions.Builderbuilder()copy()booleanstatic OpenAiChatOptionsfromOptions(OpenAiChatOptions fromOptions) Deprecated.Deprecated.getModel()getN()Deprecated.getSeed()getStop()getStore()getTools()getTopK()getTopP()getUser()inthashCode()voidsetFrequencyPenalty(Double frequencyPenalty) voidsetFunctionCallbacks(List<FunctionCallback> functionCallbacks) Deprecated.voidsetFunctions(Set<String> functionNames) Deprecated.voidsetHttpHeaders(Map<String, String> httpHeaders) voidsetInternalToolExecutionEnabled(Boolean internalToolExecutionEnabled) voidsetLogitBias(Map<String, Integer> logitBias) voidsetLogprobs(Boolean logprobs) voidsetMaxCompletionTokens(Integer maxCompletionTokens) voidsetMaxTokens(Integer maxTokens) voidsetMetadata(Map<String, String> metadata) voidvoidvoidvoidsetOutputModalities(List<String> modalities) voidsetParallelToolCalls(Boolean parallelToolCalls) voidsetPresencePenalty(Double presencePenalty) voidsetProxyToolCalls(Boolean proxyToolCalls) Deprecated.voidsetReasoningEffort(String reasoningEffort) voidsetResponseFormat(ResponseFormat responseFormat) voidvoidvoidsetStopSequences(List<String> stopSequences) voidvoidsetStreamOptions(OpenAiApi.ChatCompletionRequest.StreamOptions streamOptions) voidsetStreamUsage(Boolean enableStreamUsage) voidsetTemperature(Double temperature) voidsetToolCallbacks(List<FunctionCallback> toolCallbacks) voidsetToolChoice(Object toolChoice) voidsetToolContext(Map<String, Object> toolContext) voidsetToolNames(Set<String> toolNames) voidsetTools(List<OpenAiApi.FunctionTool> tools) voidsetTopLogprobs(Integer topLogprobs) voidvoidtoString()
-
Constructor Details
-
OpenAiChatOptions
public OpenAiChatOptions()
-
-
Method Details
-
builder
-
fromOptions
-
getStreamUsage
-
setStreamUsage
-
getModel
- Specified by:
getModelin interfaceChatOptions
-
setModel
-
getFrequencyPenalty
- Specified by:
getFrequencyPenaltyin interfaceChatOptions
-
setFrequencyPenalty
-
getLogitBias
-
setLogitBias
-
getLogprobs
-
setLogprobs
-
getTopLogprobs
-
setTopLogprobs
-
getMaxTokens
- Specified by:
getMaxTokensin interfaceChatOptions
-
setMaxTokens
-
getMaxCompletionTokens
-
setMaxCompletionTokens
-
getN
-
setN
-
getOutputModalities
-
setOutputModalities
-
getOutputAudio
-
setOutputAudio
-
getPresencePenalty
- Specified by:
getPresencePenaltyin interfaceChatOptions
-
setPresencePenalty
-
getResponseFormat
-
setResponseFormat
-
getStreamOptions
-
setStreamOptions
-
getSeed
-
setSeed
-
getStopSequences
- Specified by:
getStopSequencesin interfaceChatOptions
-
setStopSequences
-
getStop
-
setStop
-
getTemperature
- Specified by:
getTemperaturein interfaceChatOptions
-
setTemperature
-
getTopP
- Specified by:
getTopPin interfaceChatOptions
-
setTopP
-
getTools
-
setTools
-
getToolChoice
-
setToolChoice
-
getProxyToolCalls
Deprecated.- Specified by:
getProxyToolCallsin interfaceFunctionCallingOptions
-
setProxyToolCalls
Deprecated.- Specified by:
setProxyToolCallsin interfaceFunctionCallingOptions
-
getUser
-
setUser
-
getParallelToolCalls
-
setParallelToolCalls
-
getToolCallbacks
- Specified by:
getToolCallbacksin interfaceToolCallingChatOptions
-
setToolCallbacks
- Specified by:
setToolCallbacksin interfaceToolCallingChatOptions
-
getToolNames
- Specified by:
getToolNamesin interfaceToolCallingChatOptions
-
setToolNames
- Specified by:
setToolNamesin interfaceToolCallingChatOptions
-
isInternalToolExecutionEnabled
- Specified by:
isInternalToolExecutionEnabledin interfaceToolCallingChatOptions
-
setInternalToolExecutionEnabled
- Specified by:
setInternalToolExecutionEnabledin interfaceToolCallingChatOptions
-
getFunctionCallbacks
Deprecated.- Specified by:
getFunctionCallbacksin interfaceFunctionCallingOptions
-
setFunctionCallbacks
Deprecated.- Specified by:
setFunctionCallbacksin interfaceFunctionCallingOptions
-
getFunctions
Deprecated.- Specified by:
getFunctionsin interfaceFunctionCallingOptions
-
setFunctions
Deprecated.- Specified by:
setFunctionsin interfaceFunctionCallingOptions
-
getHttpHeaders
-
setHttpHeaders
-
getTopK
- Specified by:
getTopKin interfaceChatOptions
-
getToolContext
- Specified by:
getToolContextin interfaceFunctionCallingOptions
-
setToolContext
- Specified by:
setToolContextin interfaceFunctionCallingOptions
-
getStore
-
setStore
-
getMetadata
-
setMetadata
-
getReasoningEffort
-
setReasoningEffort
-
copy
- Specified by:
copyin interfaceChatOptions
-
hashCode
public int hashCode() -
equals
-
toString
-