Package org.springframework.ai.openai
Class OpenAiChatOptions.Builder
java.lang.Object
org.springframework.ai.openai.OpenAiChatOptions.Builder
- Enclosing class:
- OpenAiChatOptions
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
frequencyPenalty
(Double frequencyPenalty) functionCallbacks
(List<FunctionCallback> functionCallbacks) httpHeaders
(Map<String, String> httpHeaders) maxCompletionTokens
(Integer maxCompletionTokens) model
(OpenAiApi.ChatModel openAiChatModel) outputModalities
(List<String> modalities) parallelToolCalls
(Boolean parallelToolCalls) presencePenalty
(Double presencePenalty) proxyToolCalls
(Boolean proxyToolCalls) responseFormat
(ResponseFormat responseFormat) streamUsage
(boolean enableStreamUsage) temperature
(Double temperature) toolChoice
(Object toolChoice) toolContext
(Map<String, Object> toolContext) tools
(List<OpenAiApi.FunctionTool> tools) topLogprobs
(Integer topLogprobs) withFrequencyPenalty
(Double frequencyPenalty) Deprecated, for removal: This API element is subject to removal in a future version.withFunction
(String functionName) Deprecated, for removal: This API element is subject to removal in a future version.usefunction(String)
instead.withFunctionCallbacks
(List<FunctionCallback> functionCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.usefunctionCallbacks(List)
instead.withFunctions
(Set<String> functionNames) Deprecated, for removal: This API element is subject to removal in a future version.usefunctions(Set)
instead.withHttpHeaders
(Map<String, String> httpHeaders) Deprecated, for removal: This API element is subject to removal in a future version.usehttpHeaders(Map)
instead.withLogitBias
(Map<String, Integer> logitBias) Deprecated, for removal: This API element is subject to removal in a future version.uselogitBias(Map)
instead.withLogprobs
(Boolean logprobs) Deprecated, for removal: This API element is subject to removal in a future version.uselogprobs(Boolean)
instead.withMaxCompletionTokens
(Integer maxCompletionTokens) Deprecated, for removal: This API element is subject to removal in a future version.usemaxCompletionTokens(Integer)
instead.withMaxTokens
(Integer maxTokens) Deprecated, for removal: This API element is subject to removal in a future version.usemaxTokens(Integer)
instead.Deprecated, for removal: This API element is subject to removal in a future version.usemodel(String)
instead.withModel
(OpenAiApi.ChatModel openAiChatModel) Deprecated, for removal: This API element is subject to removal in a future version.usemodel(OpenAiApi.ChatModel)
instead.Deprecated, for removal: This API element is subject to removal in a future version.useN(Integer)
instead.Deprecated, for removal: This API element is subject to removal in a future version.useoutputAudio(AudioParameters)
instead.withOutputModalities
(List<String> modalities) Deprecated, for removal: This API element is subject to removal in a future version.useoutputModalities(List)
instead.withParallelToolCalls
(Boolean parallelToolCalls) Deprecated, for removal: This API element is subject to removal in a future version.useparallelToolCalls(Boolean)
instead.withPresencePenalty
(Double presencePenalty) Deprecated, for removal: This API element is subject to removal in a future version.usepresencePenalty(Double)
instead.withProxyToolCalls
(Boolean proxyToolCalls) Deprecated, for removal: This API element is subject to removal in a future version.useproxyToolCalls(Boolean)
instead.withResponseFormat
(ResponseFormat responseFormat) Deprecated, for removal: This API element is subject to removal in a future version.useresponseFormat(ResponseFormat)
instead.Deprecated, for removal: This API element is subject to removal in a future version.useseed(Integer)
instead.Deprecated, for removal: This API element is subject to removal in a future version.usestop(List)
instead.withStreamUsage
(boolean enableStreamUsage) Deprecated, for removal: This API element is subject to removal in a future version.usestreamUsage(boolean)
instead.withTemperature
(Double temperature) Deprecated, for removal: This API element is subject to removal in a future version.usetemperature(Double)
instead.withToolChoice
(Object toolChoice) Deprecated, for removal: This API element is subject to removal in a future version.usetoolChoice(Object)
instead.withToolContext
(Map<String, Object> toolContext) Deprecated, for removal: This API element is subject to removal in a future version.usetoolContext(Map)
instead.withTools
(List<OpenAiApi.FunctionTool> tools) Deprecated, for removal: This API element is subject to removal in a future version.usetools(List)
instead.withTopLogprobs
(Integer topLogprobs) Deprecated, for removal: This API element is subject to removal in a future version.usetopLogprobs(Integer)
instead.Deprecated, for removal: This API element is subject to removal in a future version.usetopP(Double)
instead.Deprecated, for removal: This API element is subject to removal in a future version.useuser(String)
instead.
-
Field Details
-
options
-
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
model
-
model
-
frequencyPenalty
-
logitBias
-
logprobs
-
topLogprobs
-
maxTokens
-
maxCompletionTokens
-
N
-
outputModalities
-
outputAudio
-
presencePenalty
-
responseFormat
-
streamUsage
-
seed
-
stop
-
temperature
-
topP
-
tools
-
toolChoice
-
user
-
parallelToolCalls
-
functionCallbacks
-
functions
-
function
-
proxyToolCalls
-
httpHeaders
-
toolContext
-
withModel
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withModel(String model) Deprecated, for removal: This API element is subject to removal in a future version.usemodel(String)
instead. -
withModel
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withModel(OpenAiApi.ChatModel openAiChatModel) Deprecated, for removal: This API element is subject to removal in a future version.usemodel(OpenAiApi.ChatModel)
instead. -
withFrequencyPenalty
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withFrequencyPenalty(Double frequencyPenalty) Deprecated, for removal: This API element is subject to removal in a future version.usefrequencyPenalty(Double)
instead. -
withLogitBias
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withLogitBias(Map<String, Integer> logitBias) Deprecated, for removal: This API element is subject to removal in a future version.uselogitBias(Map)
instead. -
withLogprobs
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withLogprobs(Boolean logprobs) Deprecated, for removal: This API element is subject to removal in a future version.uselogprobs(Boolean)
instead. -
withTopLogprobs
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withTopLogprobs(Integer topLogprobs) Deprecated, for removal: This API element is subject to removal in a future version.usetopLogprobs(Integer)
instead. -
withMaxTokens
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withMaxTokens(Integer maxTokens) Deprecated, for removal: This API element is subject to removal in a future version.usemaxTokens(Integer)
instead. -
withMaxCompletionTokens
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withMaxCompletionTokens(Integer maxCompletionTokens) Deprecated, for removal: This API element is subject to removal in a future version.usemaxCompletionTokens(Integer)
instead. -
withN
Deprecated, for removal: This API element is subject to removal in a future version.useN(Integer)
instead. -
withOutputModalities
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withOutputModalities(List<String> modalities) Deprecated, for removal: This API element is subject to removal in a future version.useoutputModalities(List)
instead. -
withOutputAudio
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withOutputAudio(OpenAiApi.ChatCompletionRequest.AudioParameters audio) Deprecated, for removal: This API element is subject to removal in a future version.useoutputAudio(AudioParameters)
instead. -
withPresencePenalty
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withPresencePenalty(Double presencePenalty) Deprecated, for removal: This API element is subject to removal in a future version.usepresencePenalty(Double)
instead. -
withResponseFormat
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withResponseFormat(ResponseFormat responseFormat) Deprecated, for removal: This API element is subject to removal in a future version.useresponseFormat(ResponseFormat)
instead. -
withStreamUsage
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withStreamUsage(boolean enableStreamUsage) Deprecated, for removal: This API element is subject to removal in a future version.usestreamUsage(boolean)
instead. -
withSeed
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withSeed(Integer seed) Deprecated, for removal: This API element is subject to removal in a future version.useseed(Integer)
instead. -
withStop
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withStop(List<String> stop) Deprecated, for removal: This API element is subject to removal in a future version.usestop(List)
instead. -
withTemperature
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withTemperature(Double temperature) Deprecated, for removal: This API element is subject to removal in a future version.usetemperature(Double)
instead. -
withTopP
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withTopP(Double topP) Deprecated, for removal: This API element is subject to removal in a future version.usetopP(Double)
instead. -
withTools
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withTools(List<OpenAiApi.FunctionTool> tools) Deprecated, for removal: This API element is subject to removal in a future version.usetools(List)
instead. -
withToolChoice
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withToolChoice(Object toolChoice) Deprecated, for removal: This API element is subject to removal in a future version.usetoolChoice(Object)
instead. -
withUser
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withUser(String user) Deprecated, for removal: This API element is subject to removal in a future version.useuser(String)
instead. -
withParallelToolCalls
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withParallelToolCalls(Boolean parallelToolCalls) Deprecated, for removal: This API element is subject to removal in a future version.useparallelToolCalls(Boolean)
instead. -
withFunctionCallbacks
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withFunctionCallbacks(List<FunctionCallback> functionCallbacks) Deprecated, for removal: This API element is subject to removal in a future version.usefunctionCallbacks(List)
instead. -
withFunctions
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withFunctions(Set<String> functionNames) Deprecated, for removal: This API element is subject to removal in a future version.usefunctions(Set)
instead. -
withFunction
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withFunction(String functionName) Deprecated, for removal: This API element is subject to removal in a future version.usefunction(String)
instead. -
withProxyToolCalls
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withProxyToolCalls(Boolean proxyToolCalls) Deprecated, for removal: This API element is subject to removal in a future version.useproxyToolCalls(Boolean)
instead. -
withHttpHeaders
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withHttpHeaders(Map<String, String> httpHeaders) Deprecated, for removal: This API element is subject to removal in a future version.usehttpHeaders(Map)
instead. -
withToolContext
@Deprecated(forRemoval=true, since="1.0.0-M5") public OpenAiChatOptions.Builder withToolContext(Map<String, Object> toolContext) Deprecated, for removal: This API element is subject to removal in a future version.usetoolContext(Map)
instead. -
build
-
frequencyPenalty(Double)
instead.