Package com.javaaidev.openai
Class OpenAIChatOptions
java.lang.Object
com.javaaidev.openai.OpenAIChatOptions
- All Implemented Interfaces:
org.springframework.ai.chat.prompt.ChatOptions
,org.springframework.ai.model.function.FunctionCallingOptions
,org.springframework.ai.model.ModelOptions
public class OpenAIChatOptions
extends Object
implements org.springframework.ai.model.function.FunctionCallingOptions
Options for the OpenAI Chat API.
- Since:
- 0.8.0
- Author:
- Christian Tzolov, Mariusz Bernacki, Thomas Vitale
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenAIChatOptions.Builder
builder()
copy()
boolean
static OpenAIChatOptions
fromOptions
(OpenAIChatOptions fromOptions) List<org.springframework.ai.model.function.FunctionCallback>
getModel()
getN()
getSeed()
getStop()
getTopK()
getTopP()
getUser()
int
hashCode()
void
setFrequencyPenalty
(Double frequencyPenalty) void
setFunctionCallbacks
(List<org.springframework.ai.model.function.FunctionCallback> functionCallbacks) void
setFunctions
(Set<String> functionNames) void
setHttpHeaders
(Map<String, String> httpHeaders) void
setLogitBias
(Map<String, Integer> logitBias) void
setLogprobs
(Boolean logprobs) void
setMaxCompletionTokens
(Integer maxCompletionTokens) void
setMaxTokens
(Integer maxTokens) void
void
void
setOutputModalities
(List<String> modalities) void
setParallelToolCalls
(Boolean parallelToolCalls) void
setPresencePenalty
(Double presencePenalty) void
setProxyToolCalls
(Boolean proxyToolCalls) void
void
void
setStopSequences
(List<String> stopSequences) void
setTemperature
(Double temperature) void
setToolChoice
(Object toolChoice) void
setToolContext
(Map<String, Object> toolContext) void
setTopLogprobs
(Integer topLogprobs) void
void
toString()
-
Constructor Details
-
OpenAIChatOptions
public OpenAIChatOptions()
-
-
Method Details
-
builder
-
fromOptions
-
getModel
- Specified by:
getModel
in interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setModel
-
getFrequencyPenalty
- Specified by:
getFrequencyPenalty
in interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setFrequencyPenalty
-
getLogitBias
-
setLogitBias
-
getLogprobs
-
setLogprobs
-
getTopLogprobs
-
setTopLogprobs
-
getMaxTokens
- Specified by:
getMaxTokens
in interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setMaxTokens
-
getMaxCompletionTokens
-
setMaxCompletionTokens
-
getN
-
setN
-
getOutputModalities
-
setOutputModalities
-
getPresencePenalty
- Specified by:
getPresencePenalty
in interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setPresencePenalty
-
getSeed
-
setSeed
-
getStopSequences
- Specified by:
getStopSequences
in interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setStopSequences
-
getStop
-
setStop
-
getTemperature
- Specified by:
getTemperature
in interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setTemperature
-
getTopP
- Specified by:
getTopP
in interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setTopP
-
getToolChoice
-
setToolChoice
-
getProxyToolCalls
- Specified by:
getProxyToolCalls
in interfaceorg.springframework.ai.model.function.FunctionCallingOptions
-
setProxyToolCalls
- Specified by:
setProxyToolCalls
in interfaceorg.springframework.ai.model.function.FunctionCallingOptions
-
getUser
-
setUser
-
getParallelToolCalls
-
setParallelToolCalls
-
getFunctionCallbacks
- Specified by:
getFunctionCallbacks
in interfaceorg.springframework.ai.model.function.FunctionCallingOptions
-
setFunctionCallbacks
public void setFunctionCallbacks(List<org.springframework.ai.model.function.FunctionCallback> functionCallbacks) - Specified by:
setFunctionCallbacks
in interfaceorg.springframework.ai.model.function.FunctionCallingOptions
-
getFunctions
- Specified by:
getFunctions
in interfaceorg.springframework.ai.model.function.FunctionCallingOptions
-
setFunctions
- Specified by:
setFunctions
in interfaceorg.springframework.ai.model.function.FunctionCallingOptions
-
getHttpHeaders
-
setHttpHeaders
-
getTopK
- Specified by:
getTopK
in interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
getToolContext
- Specified by:
getToolContext
in interfaceorg.springframework.ai.model.function.FunctionCallingOptions
-
setToolContext
- Specified by:
setToolContext
in interfaceorg.springframework.ai.model.function.FunctionCallingOptions
-
copy
- Specified by:
copy
in interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
hashCode
public int hashCode() -
equals
-
toString
-